From d6eb904bb8588b2276a1f78d2e4c3c4f4e7982e4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 30 Oct 2024 06:18:25 +0000 Subject: [PATCH 1/2] feat: Add GroundedGenerationService API feat: Add AdvancedCompleteQuery API feat: Add lite search API to allow public website search with API key feat: Add Sitemap APIs to preview channel feat: Support search personalization to preview channel feat: Support natural language understanding search feat: Add BillingEstimation in data store feat: Support Google Workspace search feat: Support advanced boost search feat: Add one_box_page_size on search feat: support query regex in control match rules docs: deprecate extractive_answers in answer generation docs: deprecate asynchronous mode in answer generation docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 691212731 Source-Link: https://github.com/googleapis/googleapis/commit/e6b6ff9b7b3659641488e772355cdc78aac488ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/67144fd43c5a3e164410b3617e5752f2e066ec25 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmcvLk93bEJvdC55YW1sIiwiaCI6IjY3MTQ0ZmQ0M2M1YTNlMTY0NDEwYjM2MTdlNTc1MmYyZTA2NmVjMjUifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3VyaXR5Y2VudGVybWFuYWdlbWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNjcxNDRmZDQzYzVhM2UxNjQ0MTBiMzYxN2U1NzUyZjJlMDY2ZWMyNSJ9 --- .../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 + .../eventarc/publishing/v1/cloud_event.proto | 95 + .../eventarc/publishing/v1/publisher.proto | 156 + .../v1/protos/protos.d.ts | 7403 ++++ .../v1/protos/protos.js | 20370 +++++++++ .../v1/protos/protos.json | 2057 + .../samples/generated/v1/publisher.publish.js | 80 + ...isher.publish_channel_connection_events.js | 74 + .../generated/v1/publisher.publish_events.js | 74 + ...a_google.cloud.eventarc.publishing.v1.json | 163 + .../v1/src/index.ts | 25 + .../v1/src/v1/gapic_metadata.json | 53 + .../v1/src/v1/index.ts | 19 + .../v1/src/v1/publisher_client.ts | 600 + .../v1/src/v1/publisher_client_config.json | 40 + .../v1/src/v1/publisher_proto_list.json | 4 + .../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_publisher_v1.ts | 538 + .../v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + .../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/security_center_management.proto | 1796 + .../v1/protos/protos.d.ts | 13604 ++++++ .../v1/protos/protos.js | 35369 ++++++++++++++++ .../v1/protos/protos.json | 3971 ++ ...te_event_threat_detection_custom_module.js | 84 + ...security_health_analytics_custom_module.js | 83 + ...te_event_threat_detection_custom_module.js | 78 + ...security_health_analytics_custom_module.js | 78 + ...ve_event_threat_detection_custom_module.js | 65 + ...security_health_analytics_custom_module.js | 65 + ...et_event_threat_detection_custom_module.js | 65 + ..._management.get_security_center_service.js | 76 + ...security_health_analytics_custom_module.js | 62 + ...t_event_threat_detection_custom_modules.js | 80 + ...ecurity_health_analytics_custom_modules.js | 79 + ...e_event_threat_detection_custom_modules.js | 79 + ...ecurity_health_analytics_custom_modules.js | 79 + ...t_event_threat_detection_custom_modules.js | 80 + ...anagement.list_security_center_services.js | 84 + ...ecurity_health_analytics_custom_modules.js | 79 + ...security_health_analytics_custom_module.js | 74 + ...te_event_threat_detection_custom_module.js | 79 + ...nagement.update_security_center_service.js | 82 + ...security_health_analytics_custom_module.js | 83 + ...te_event_threat_detection_custom_module.js | 74 + ...gle.cloud.securitycentermanagement.v1.json | 983 + .../v1/src/index.ts | 25 + .../v1/src/v1/gapic_metadata.json | 261 + .../v1/src/v1/index.ts | 19 + .../v1/security_center_management_client.ts | 4154 ++ ...urity_center_management_client_config.json | 128 + ...security_center_management_proto_list.json | 3 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../v1/system-test/install.ts | 49 + .../gapic_security_center_management_v1.ts | 4633 ++ .../v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + 75 files changed, 99073 insertions(+) create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/README.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/test/gapic_publisher_v1.ts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/webpack.config.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/README.md create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintignore b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintrc.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.gitignore b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/.jsdoc.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.jsdoc.js new file mode 100644 index 00000000000..dac239f982c --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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/eventarc-publishing', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.mocharc.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/.prettierrc.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/README.md b/owl-bot-staging/google-cloud-eventarc-publishing/v1/README.md new file mode 100644 index 00000000000..e5f320996fd --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/README.md @@ -0,0 +1 @@ +Publishing: Nodejs Client diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json new file mode 100644 index 00000000000..c2298e54a7d --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/eventarc-publishing", + "version": "0.1.0", + "description": "Publishing client for Node.js", + "repository": "googleapis/nodejs-publishing", + "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 publishing", + "publishing", + "publisher" + ], + "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-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto new file mode 100644 index 00000000000..bb9c42cbab2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto @@ -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 +// +// 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.eventarc.publishing.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1"; +option go_package = "cloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb"; +option java_multiple_files = true; +option java_outer_classname = "CloudEventProto"; +option java_package = "com.google.cloud.eventarc.publishing.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\Publishing\\V1"; +option ruby_package = "Google::Cloud::Eventarc::Publishing::V1"; + +// CloudEvent represents a vendor-neutral specification for defining the format +// of event data. +message CloudEvent { + // The following abstract data types are available for use in attributes. + message CloudEventAttributeValue { + // The value of the attribute. + oneof attr { + // Boolean value. + bool ce_boolean = 1; + + // Integer value. + int32 ce_integer = 2; + + // String value. + string ce_string = 3; + + // Bytes value. + bytes ce_bytes = 4; + + // URI value. + string ce_uri = 5; + + // URI-reference value. + string ce_uri_ref = 6; + + // Timestamp value. + google.protobuf.Timestamp ce_timestamp = 7; + } + } + + // Required. Identifies the event. Producers MUST ensure that source + id is + // unique for each distinct event. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Identifies the context in which an event happened. + // URI-reference + string source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version of the CloudEvents specification which the event + // uses. + string spec_version = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. This attribute contains a value describing the type of event + // related to the originating occurrence. + string type = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Used for Optional & Extension Attributes + map attributes = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // The event payload. It should be encoded into a media format which is + // specified by the 'datacontenttype' attribute (e.g. application/json), and + // adheres to the dataschema format when those respective attributes are + // present. + oneof data { + // Optional. Binary data. + bytes binary_data = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text data. + string text_data = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Proto data. + google.protobuf.Any proto_data = 8 [(google.api.field_behavior) = OPTIONAL]; + } +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto new file mode 100644 index 00000000000..0037200cb74 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto @@ -0,0 +1,156 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.eventarc.publishing.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/cloud/eventarc/publishing/v1/cloud_event.proto"; +import "google/protobuf/any.proto"; + +option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1"; +option go_package = "cloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb"; +option java_multiple_files = true; +option java_outer_classname = "PublisherProto"; +option java_package = "com.google.cloud.eventarc.publishing.v1"; +option php_namespace = "Google\\Cloud\\Eventarc\\Publishing\\V1"; +option ruby_package = "Google::Cloud::Eventarc::Publishing::V1"; + +// Eventarc processes events generated by an event provider and delivers them to +// a subscriber. +// +// An event provider is a software-as-a-service (SaaS) system or +// product that can generate and deliver events through Eventarc. +// +// A third-party event provider is an event provider from outside of Google. +// +// A partner is a third-party event provider that is integrated with Eventarc. +// +// A subscriber is a GCP customer interested in receiving events. +// +// Channel is a first-class Eventarc resource that is created and managed +// by the subscriber in their GCP project. A Channel represents a subscriber's +// intent to receive events from an event provider. A Channel is associated with +// exactly one event provider. +// +// ChannelConnection is a first-class Eventarc resource that +// is created and managed by the partner in their GCP project. A +// ChannelConnection represents a connection between a partner and a +// subscriber's Channel. A ChannelConnection has a one-to-one mapping with a +// Channel. +// +// Publisher allows an event provider to publish events to Eventarc. +service Publisher { + option (google.api.default_host) = "eventarcpublishing.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Publish events to a ChannelConnection in a partner's project. + rpc PublishChannelConnectionEvents(PublishChannelConnectionEventsRequest) + returns (PublishChannelConnectionEventsResponse) { + option (google.api.http) = { + post: "/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents" + body: "*" + }; + } + + // Publish events to a subscriber's channel. + rpc PublishEvents(PublishEventsRequest) returns (PublishEventsResponse) { + option (google.api.http) = { + post: "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents" + body: "*" + }; + } + + // Publish events to a message bus. + rpc Publish(PublishRequest) returns (PublishResponse) { + option (google.api.http) = { + post: "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish" + body: "*" + }; + } +} + +// The request message for the PublishChannelConnectionEvents method. +message PublishChannelConnectionEventsRequest { + // The channel_connection that the events are published from. For example: + // `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + string channel_connection = 1; + + // The CloudEvents v1.0 events to publish. No other types are allowed. + // If this field is set, then the `text_events` fields must not be set. + repeated google.protobuf.Any events = 2; + + // The text representation of events to publish. + // CloudEvent v1.0 in JSON format is the only allowed type. Refer to + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + // for specification. + // If this field is set, then the `events` fields must not be set. + repeated string text_events = 3; +} + +// The response message for the PublishChannelConnectionEvents method. +message PublishChannelConnectionEventsResponse {} + +// The request message for the PublishEvents method. +message PublishEventsRequest { + // The full name of the channel to publish to. For example: + // `projects/{project}/locations/{location}/channels/{channel-id}`. + string channel = 1; + + // The CloudEvents v1.0 events to publish. No other types are allowed. + // If this field is set, then the `text_events` fields must not be set. + repeated google.protobuf.Any events = 2; + + // The text representation of events to publish. + // CloudEvent v1.0 in JSON format is the only allowed type. Refer to + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + // for specification. + // If this field is set, then the `events` fields must not be set. + repeated string text_events = 3; +} + +// The response message for the PublishEvents method. +message PublishEventsResponse {} + +// The request message for the Publish method. +message PublishRequest { + // Required. The full name of the message bus to publish events to. Format: + // `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + string message_bus = 1 [(google.api.field_behavior) = REQUIRED]; + + oneof format { + // The Protobuf format of the CloudEvent being published. Specification can + // be found here: + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + CloudEvent proto_message = 2; + + // The JSON format of the CloudEvent being published. Specification can be + // found here: + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + string json_message = 3; + + // The Avro format of the CloudEvent being published. Specification can + // be found here: + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + bytes avro_message = 4; + } +} + +// The response message for the Publish method. +message PublishResponse {} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts new file mode 100644 index 00000000000..d060f240e25 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts @@ -0,0 +1,7403 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 eventarc. */ + namespace eventarc { + + /** Namespace publishing. */ + namespace publishing { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a CloudEvent. */ + interface ICloudEvent { + + /** CloudEvent id */ + id?: (string|null); + + /** CloudEvent source */ + source?: (string|null); + + /** CloudEvent specVersion */ + specVersion?: (string|null); + + /** CloudEvent type */ + type?: (string|null); + + /** CloudEvent attributes */ + attributes?: ({ [k: string]: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue }|null); + + /** CloudEvent binaryData */ + binaryData?: (Uint8Array|string|null); + + /** CloudEvent textData */ + textData?: (string|null); + + /** CloudEvent protoData */ + protoData?: (google.protobuf.IAny|null); + } + + /** Represents a CloudEvent. */ + class CloudEvent implements ICloudEvent { + + /** + * Constructs a new CloudEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.ICloudEvent); + + /** CloudEvent id. */ + public id: string; + + /** CloudEvent source. */ + public source: string; + + /** CloudEvent specVersion. */ + public specVersion: string; + + /** CloudEvent type. */ + public type: string; + + /** CloudEvent attributes. */ + public attributes: { [k: string]: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue }; + + /** CloudEvent binaryData. */ + public binaryData?: (Uint8Array|string|null); + + /** CloudEvent textData. */ + public textData?: (string|null); + + /** CloudEvent protoData. */ + public protoData?: (google.protobuf.IAny|null); + + /** CloudEvent data. */ + public data?: ("binaryData"|"textData"|"protoData"); + + /** + * Creates a new CloudEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudEvent instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.ICloudEvent): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Encodes the specified CloudEvent message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @param message CloudEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.ICloudEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudEvent message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @param message CloudEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.ICloudEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Decodes a CloudEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Verifies a CloudEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Creates a plain object from a CloudEvent message. Also converts values to other types if specified. + * @param message CloudEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.CloudEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudEvent { + + /** Properties of a CloudEventAttributeValue. */ + interface ICloudEventAttributeValue { + + /** CloudEventAttributeValue ceBoolean */ + ceBoolean?: (boolean|null); + + /** CloudEventAttributeValue ceInteger */ + ceInteger?: (number|null); + + /** CloudEventAttributeValue ceString */ + ceString?: (string|null); + + /** CloudEventAttributeValue ceBytes */ + ceBytes?: (Uint8Array|string|null); + + /** CloudEventAttributeValue ceUri */ + ceUri?: (string|null); + + /** CloudEventAttributeValue ceUriRef */ + ceUriRef?: (string|null); + + /** CloudEventAttributeValue ceTimestamp */ + ceTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CloudEventAttributeValue. */ + class CloudEventAttributeValue implements ICloudEventAttributeValue { + + /** + * Constructs a new CloudEventAttributeValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue); + + /** CloudEventAttributeValue ceBoolean. */ + public ceBoolean?: (boolean|null); + + /** CloudEventAttributeValue ceInteger. */ + public ceInteger?: (number|null); + + /** CloudEventAttributeValue ceString. */ + public ceString?: (string|null); + + /** CloudEventAttributeValue ceBytes. */ + public ceBytes?: (Uint8Array|string|null); + + /** CloudEventAttributeValue ceUri. */ + public ceUri?: (string|null); + + /** CloudEventAttributeValue ceUriRef. */ + public ceUriRef?: (string|null); + + /** CloudEventAttributeValue ceTimestamp. */ + public ceTimestamp?: (google.protobuf.ITimestamp|null); + + /** CloudEventAttributeValue attr. */ + public attr?: ("ceBoolean"|"ceInteger"|"ceString"|"ceBytes"|"ceUri"|"ceUriRef"|"ceTimestamp"); + + /** + * Creates a new CloudEventAttributeValue instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudEventAttributeValue instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Encodes the specified CloudEventAttributeValue message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @param message CloudEventAttributeValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudEventAttributeValue message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @param message CloudEventAttributeValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Verifies a CloudEventAttributeValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudEventAttributeValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudEventAttributeValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Creates a plain object from a CloudEventAttributeValue message. Also converts values to other types if specified. + * @param message CloudEventAttributeValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudEventAttributeValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudEventAttributeValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Represents a Publisher */ + class Publisher extends $protobuf.rpc.Service { + + /** + * Constructs a new Publisher 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 Publisher 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): Publisher; + + /** + * Calls PublishChannelConnectionEvents. + * @param request PublishChannelConnectionEventsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PublishChannelConnectionEventsResponse + */ + public publishChannelConnectionEvents(request: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, callback: google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEventsCallback): void; + + /** + * Calls PublishChannelConnectionEvents. + * @param request PublishChannelConnectionEventsRequest message or plain object + * @returns Promise + */ + public publishChannelConnectionEvents(request: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest): Promise; + + /** + * Calls PublishEvents. + * @param request PublishEventsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PublishEventsResponse + */ + public publishEvents(request: google.cloud.eventarc.publishing.v1.IPublishEventsRequest, callback: google.cloud.eventarc.publishing.v1.Publisher.PublishEventsCallback): void; + + /** + * Calls PublishEvents. + * @param request PublishEventsRequest message or plain object + * @returns Promise + */ + public publishEvents(request: google.cloud.eventarc.publishing.v1.IPublishEventsRequest): Promise; + + /** + * Calls Publish. + * @param request PublishRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PublishResponse + */ + public publish(request: google.cloud.eventarc.publishing.v1.IPublishRequest, callback: google.cloud.eventarc.publishing.v1.Publisher.PublishCallback): void; + + /** + * Calls Publish. + * @param request PublishRequest message or plain object + * @returns Promise + */ + public publish(request: google.cloud.eventarc.publishing.v1.IPublishRequest): Promise; + } + + namespace Publisher { + + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishChannelConnectionEvents}. + * @param error Error, if any + * @param [response] PublishChannelConnectionEventsResponse + */ + type PublishChannelConnectionEventsCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishEvents}. + * @param error Error, if any + * @param [response] PublishEventsResponse + */ + type PublishEventsCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishEventsResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publish}. + * @param error Error, if any + * @param [response] PublishResponse + */ + type PublishCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishResponse) => void; + } + + /** Properties of a PublishChannelConnectionEventsRequest. */ + interface IPublishChannelConnectionEventsRequest { + + /** PublishChannelConnectionEventsRequest channelConnection */ + channelConnection?: (string|null); + + /** PublishChannelConnectionEventsRequest events */ + events?: (google.protobuf.IAny[]|null); + + /** PublishChannelConnectionEventsRequest textEvents */ + textEvents?: (string[]|null); + } + + /** Represents a PublishChannelConnectionEventsRequest. */ + class PublishChannelConnectionEventsRequest implements IPublishChannelConnectionEventsRequest { + + /** + * Constructs a new PublishChannelConnectionEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest); + + /** PublishChannelConnectionEventsRequest channelConnection. */ + public channelConnection: string; + + /** PublishChannelConnectionEventsRequest events. */ + public events: google.protobuf.IAny[]; + + /** PublishChannelConnectionEventsRequest textEvents. */ + public textEvents: string[]; + + /** + * Creates a new PublishChannelConnectionEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishChannelConnectionEventsRequest instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; + + /** + * Encodes the specified PublishChannelConnectionEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. + * @param message PublishChannelConnectionEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishChannelConnectionEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. + * @param message PublishChannelConnectionEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishChannelConnectionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; + + /** + * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishChannelConnectionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; + + /** + * Verifies a PublishChannelConnectionEventsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishChannelConnectionEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishChannelConnectionEventsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; + + /** + * Creates a plain object from a PublishChannelConnectionEventsRequest message. Also converts values to other types if specified. + * @param message PublishChannelConnectionEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishChannelConnectionEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishChannelConnectionEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishChannelConnectionEventsResponse. */ + interface IPublishChannelConnectionEventsResponse { + } + + /** Represents a PublishChannelConnectionEventsResponse. */ + class PublishChannelConnectionEventsResponse implements IPublishChannelConnectionEventsResponse { + + /** + * Constructs a new PublishChannelConnectionEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse); + + /** + * Creates a new PublishChannelConnectionEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishChannelConnectionEventsResponse instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; + + /** + * Encodes the specified PublishChannelConnectionEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. + * @param message PublishChannelConnectionEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishChannelConnectionEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. + * @param message PublishChannelConnectionEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishChannelConnectionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; + + /** + * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishChannelConnectionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; + + /** + * Verifies a PublishChannelConnectionEventsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishChannelConnectionEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishChannelConnectionEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; + + /** + * Creates a plain object from a PublishChannelConnectionEventsResponse message. Also converts values to other types if specified. + * @param message PublishChannelConnectionEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishChannelConnectionEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishChannelConnectionEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishEventsRequest. */ + interface IPublishEventsRequest { + + /** PublishEventsRequest channel */ + channel?: (string|null); + + /** PublishEventsRequest events */ + events?: (google.protobuf.IAny[]|null); + + /** PublishEventsRequest textEvents */ + textEvents?: (string[]|null); + } + + /** Represents a PublishEventsRequest. */ + class PublishEventsRequest implements IPublishEventsRequest { + + /** + * Constructs a new PublishEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsRequest); + + /** PublishEventsRequest channel. */ + public channel: string; + + /** PublishEventsRequest events. */ + public events: google.protobuf.IAny[]; + + /** PublishEventsRequest textEvents. */ + public textEvents: string[]; + + /** + * Creates a new PublishEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishEventsRequest instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsRequest): google.cloud.eventarc.publishing.v1.PublishEventsRequest; + + /** + * Encodes the specified PublishEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. + * @param message PublishEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. + * @param message PublishEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishEventsRequest; + + /** + * Decodes a PublishEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishEventsRequest; + + /** + * Verifies a PublishEventsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishEventsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishEventsRequest; + + /** + * Creates a plain object from a PublishEventsRequest message. Also converts values to other types if specified. + * @param message PublishEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishEventsResponse. */ + interface IPublishEventsResponse { + } + + /** Represents a PublishEventsResponse. */ + class PublishEventsResponse implements IPublishEventsResponse { + + /** + * Constructs a new PublishEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsResponse); + + /** + * Creates a new PublishEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishEventsResponse instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsResponse): google.cloud.eventarc.publishing.v1.PublishEventsResponse; + + /** + * Encodes the specified PublishEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. + * @param message PublishEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. + * @param message PublishEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishEventsResponse; + + /** + * Decodes a PublishEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishEventsResponse; + + /** + * Verifies a PublishEventsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishEventsResponse; + + /** + * Creates a plain object from a PublishEventsResponse message. Also converts values to other types if specified. + * @param message PublishEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishRequest. */ + interface IPublishRequest { + + /** PublishRequest messageBus */ + messageBus?: (string|null); + + /** PublishRequest protoMessage */ + protoMessage?: (google.cloud.eventarc.publishing.v1.ICloudEvent|null); + + /** PublishRequest jsonMessage */ + jsonMessage?: (string|null); + + /** PublishRequest avroMessage */ + avroMessage?: (Uint8Array|string|null); + } + + /** Represents a PublishRequest. */ + class PublishRequest implements IPublishRequest { + + /** + * Constructs a new PublishRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishRequest); + + /** PublishRequest messageBus. */ + public messageBus: string; + + /** PublishRequest protoMessage. */ + public protoMessage?: (google.cloud.eventarc.publishing.v1.ICloudEvent|null); + + /** PublishRequest jsonMessage. */ + public jsonMessage?: (string|null); + + /** PublishRequest avroMessage. */ + public avroMessage?: (Uint8Array|string|null); + + /** PublishRequest format. */ + public format?: ("protoMessage"|"jsonMessage"|"avroMessage"); + + /** + * Creates a new PublishRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishRequest instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishRequest): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Encodes the specified PublishRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @param message PublishRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @param message PublishRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Decodes a PublishRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Verifies a PublishRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. + * @param message PublishRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishResponse. */ + interface IPublishResponse { + } + + /** Represents a PublishResponse. */ + class PublishResponse implements IPublishResponse { + + /** + * Constructs a new PublishResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishResponse); + + /** + * Creates a new PublishResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishResponse instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishResponse): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Encodes the specified PublishResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @param message PublishResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @param message PublishResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Decodes a PublishResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Verifies a PublishResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. + * @param message PublishResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishResponse + * @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 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 + } + + /** 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 + } + } + } + + /** 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); + } + + /** 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); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + } + + /** 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); + } + + /** 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 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 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 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; + } + } +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js new file mode 100644 index 00000000000..232fedd1b00 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js @@ -0,0 +1,20370 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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_eventarc_publishing_protos || ($protobuf.roots._google_cloud_eventarc_publishing_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.eventarc = (function() { + + /** + * Namespace eventarc. + * @memberof google.cloud + * @namespace + */ + var eventarc = {}; + + eventarc.publishing = (function() { + + /** + * Namespace publishing. + * @memberof google.cloud.eventarc + * @namespace + */ + var publishing = {}; + + publishing.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.eventarc.publishing + * @namespace + */ + var v1 = {}; + + v1.CloudEvent = (function() { + + /** + * Properties of a CloudEvent. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface ICloudEvent + * @property {string|null} [id] CloudEvent id + * @property {string|null} [source] CloudEvent source + * @property {string|null} [specVersion] CloudEvent specVersion + * @property {string|null} [type] CloudEvent type + * @property {Object.|null} [attributes] CloudEvent attributes + * @property {Uint8Array|null} [binaryData] CloudEvent binaryData + * @property {string|null} [textData] CloudEvent textData + * @property {google.protobuf.IAny|null} [protoData] CloudEvent protoData + */ + + /** + * Constructs a new CloudEvent. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a CloudEvent. + * @implements ICloudEvent + * @constructor + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent=} [properties] Properties to set + */ + function CloudEvent(properties) { + this.attributes = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudEvent id. + * @member {string} id + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.id = ""; + + /** + * CloudEvent source. + * @member {string} source + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.source = ""; + + /** + * CloudEvent specVersion. + * @member {string} specVersion + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.specVersion = ""; + + /** + * CloudEvent type. + * @member {string} type + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.type = ""; + + /** + * CloudEvent attributes. + * @member {Object.} attributes + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.attributes = $util.emptyObject; + + /** + * CloudEvent binaryData. + * @member {Uint8Array|null|undefined} binaryData + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.binaryData = null; + + /** + * CloudEvent textData. + * @member {string|null|undefined} textData + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.textData = null; + + /** + * CloudEvent protoData. + * @member {google.protobuf.IAny|null|undefined} protoData + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.protoData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudEvent data. + * @member {"binaryData"|"textData"|"protoData"|undefined} data + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + Object.defineProperty(CloudEvent.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["binaryData", "textData", "protoData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudEvent instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent instance + */ + CloudEvent.create = function create(properties) { + return new CloudEvent(properties); + }; + + /** + * Encodes the specified CloudEvent message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent} message CloudEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.source); + if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.specVersion); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) + for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.binaryData != null && Object.hasOwnProperty.call(message, "binaryData")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.binaryData); + if (message.textData != null && Object.hasOwnProperty.call(message, "textData")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.textData); + if (message.protoData != null && Object.hasOwnProperty.call(message, "protoData")) + $root.google.protobuf.Any.encode(message.protoData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudEvent message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent} message CloudEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.source = reader.string(); + break; + } + case 3: { + message.specVersion = reader.string(); + break; + } + case 4: { + message.type = reader.string(); + break; + } + case 5: { + if (message.attributes === $util.emptyObject) + message.attributes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.attributes[key] = value; + break; + } + case 6: { + message.binaryData = reader.bytes(); + break; + } + case 7: { + message.textData = reader.string(); + break; + } + case 8: { + message.protoData = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudEvent message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + if (!$util.isString(message.specVersion)) + return "specVersion: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!$util.isObject(message.attributes)) + return "attributes: object expected"; + var key = Object.keys(message.attributes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify(message.attributes[key[i]]); + if (error) + return "attributes." + error; + } + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) { + properties.data = 1; + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + } + if (message.textData != null && message.hasOwnProperty("textData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + if (!$util.isString(message.textData)) + return "textData: string expected"; + } + if (message.protoData != null && message.hasOwnProperty("protoData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoData); + if (error) + return "protoData." + error; + } + } + return null; + }; + + /** + * Creates a CloudEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent + */ + CloudEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.CloudEvent) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent(); + if (object.id != null) + message.id = String(object.id); + if (object.source != null) + message.source = String(object.source); + if (object.specVersion != null) + message.specVersion = String(object.specVersion); + if (object.type != null) + message.type = String(object.type); + if (object.attributes) { + if (typeof object.attributes !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.attributes: object expected"); + message.attributes = {}; + for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { + if (typeof object.attributes[keys[i]] !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.attributes: object expected"); + message.attributes[keys[i]] = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.fromObject(object.attributes[keys[i]]); + } + } + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length >= 0) + message.binaryData = object.binaryData; + if (object.textData != null) + message.textData = String(object.textData); + if (object.protoData != null) { + if (typeof object.protoData !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.protoData: object expected"); + message.protoData = $root.google.protobuf.Any.fromObject(object.protoData); + } + return message; + }; + + /** + * Creates a plain object from a CloudEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent} message CloudEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.attributes = {}; + if (options.defaults) { + object.id = ""; + object.source = ""; + object.specVersion = ""; + object.type = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + object.specVersion = message.specVersion; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { + object.attributes = {}; + for (var j = 0; j < keys2.length; ++j) + object.attributes[keys2[j]] = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.toObject(message.attributes[keys2[j]], options); + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) { + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + if (options.oneofs) + object.data = "binaryData"; + } + if (message.textData != null && message.hasOwnProperty("textData")) { + object.textData = message.textData; + if (options.oneofs) + object.data = "textData"; + } + if (message.protoData != null && message.hasOwnProperty("protoData")) { + object.protoData = $root.google.protobuf.Any.toObject(message.protoData, options); + if (options.oneofs) + object.data = "protoData"; + } + return object; + }; + + /** + * Converts this CloudEvent to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + * @returns {Object.} JSON object + */ + CloudEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudEvent + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.CloudEvent"; + }; + + CloudEvent.CloudEventAttributeValue = (function() { + + /** + * Properties of a CloudEventAttributeValue. + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @interface ICloudEventAttributeValue + * @property {boolean|null} [ceBoolean] CloudEventAttributeValue ceBoolean + * @property {number|null} [ceInteger] CloudEventAttributeValue ceInteger + * @property {string|null} [ceString] CloudEventAttributeValue ceString + * @property {Uint8Array|null} [ceBytes] CloudEventAttributeValue ceBytes + * @property {string|null} [ceUri] CloudEventAttributeValue ceUri + * @property {string|null} [ceUriRef] CloudEventAttributeValue ceUriRef + * @property {google.protobuf.ITimestamp|null} [ceTimestamp] CloudEventAttributeValue ceTimestamp + */ + + /** + * Constructs a new CloudEventAttributeValue. + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @classdesc Represents a CloudEventAttributeValue. + * @implements ICloudEventAttributeValue + * @constructor + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue=} [properties] Properties to set + */ + function CloudEventAttributeValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudEventAttributeValue ceBoolean. + * @member {boolean|null|undefined} ceBoolean + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceBoolean = null; + + /** + * CloudEventAttributeValue ceInteger. + * @member {number|null|undefined} ceInteger + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceInteger = null; + + /** + * CloudEventAttributeValue ceString. + * @member {string|null|undefined} ceString + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceString = null; + + /** + * CloudEventAttributeValue ceBytes. + * @member {Uint8Array|null|undefined} ceBytes + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceBytes = null; + + /** + * CloudEventAttributeValue ceUri. + * @member {string|null|undefined} ceUri + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceUri = null; + + /** + * CloudEventAttributeValue ceUriRef. + * @member {string|null|undefined} ceUriRef + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceUriRef = null; + + /** + * CloudEventAttributeValue ceTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} ceTimestamp + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudEventAttributeValue attr. + * @member {"ceBoolean"|"ceInteger"|"ceString"|"ceBytes"|"ceUri"|"ceUriRef"|"ceTimestamp"|undefined} attr + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + Object.defineProperty(CloudEventAttributeValue.prototype, "attr", { + get: $util.oneOfGetter($oneOfFields = ["ceBoolean", "ceInteger", "ceString", "ceBytes", "ceUri", "ceUriRef", "ceTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudEventAttributeValue instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue instance + */ + CloudEventAttributeValue.create = function create(properties) { + return new CloudEventAttributeValue(properties); + }; + + /** + * Encodes the specified CloudEventAttributeValue message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue} message CloudEventAttributeValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEventAttributeValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ceBoolean != null && Object.hasOwnProperty.call(message, "ceBoolean")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ceBoolean); + if (message.ceInteger != null && Object.hasOwnProperty.call(message, "ceInteger")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ceInteger); + if (message.ceString != null && Object.hasOwnProperty.call(message, "ceString")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ceString); + if (message.ceBytes != null && Object.hasOwnProperty.call(message, "ceBytes")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.ceBytes); + if (message.ceUri != null && Object.hasOwnProperty.call(message, "ceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.ceUri); + if (message.ceUriRef != null && Object.hasOwnProperty.call(message, "ceUriRef")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.ceUriRef); + if (message.ceTimestamp != null && Object.hasOwnProperty.call(message, "ceTimestamp")) + $root.google.protobuf.Timestamp.encode(message.ceTimestamp, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudEventAttributeValue message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue} message CloudEventAttributeValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEventAttributeValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEventAttributeValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ceBoolean = reader.bool(); + break; + } + case 2: { + message.ceInteger = reader.int32(); + break; + } + case 3: { + message.ceString = reader.string(); + break; + } + case 4: { + message.ceBytes = reader.bytes(); + break; + } + case 5: { + message.ceUri = reader.string(); + break; + } + case 6: { + message.ceUriRef = reader.string(); + break; + } + case 7: { + message.ceTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEventAttributeValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudEventAttributeValue message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudEventAttributeValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ceBoolean != null && message.hasOwnProperty("ceBoolean")) { + properties.attr = 1; + if (typeof message.ceBoolean !== "boolean") + return "ceBoolean: boolean expected"; + } + if (message.ceInteger != null && message.hasOwnProperty("ceInteger")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isInteger(message.ceInteger)) + return "ceInteger: integer expected"; + } + if (message.ceString != null && message.hasOwnProperty("ceString")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isString(message.ceString)) + return "ceString: string expected"; + } + if (message.ceBytes != null && message.hasOwnProperty("ceBytes")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!(message.ceBytes && typeof message.ceBytes.length === "number" || $util.isString(message.ceBytes))) + return "ceBytes: buffer expected"; + } + if (message.ceUri != null && message.hasOwnProperty("ceUri")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isString(message.ceUri)) + return "ceUri: string expected"; + } + if (message.ceUriRef != null && message.hasOwnProperty("ceUriRef")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isString(message.ceUriRef)) + return "ceUriRef: string expected"; + } + if (message.ceTimestamp != null && message.hasOwnProperty("ceTimestamp")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.ceTimestamp); + if (error) + return "ceTimestamp." + error; + } + } + return null; + }; + + /** + * Creates a CloudEventAttributeValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue + */ + CloudEventAttributeValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue(); + if (object.ceBoolean != null) + message.ceBoolean = Boolean(object.ceBoolean); + if (object.ceInteger != null) + message.ceInteger = object.ceInteger | 0; + if (object.ceString != null) + message.ceString = String(object.ceString); + if (object.ceBytes != null) + if (typeof object.ceBytes === "string") + $util.base64.decode(object.ceBytes, message.ceBytes = $util.newBuffer($util.base64.length(object.ceBytes)), 0); + else if (object.ceBytes.length >= 0) + message.ceBytes = object.ceBytes; + if (object.ceUri != null) + message.ceUri = String(object.ceUri); + if (object.ceUriRef != null) + message.ceUriRef = String(object.ceUriRef); + if (object.ceTimestamp != null) { + if (typeof object.ceTimestamp !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.ceTimestamp: object expected"); + message.ceTimestamp = $root.google.protobuf.Timestamp.fromObject(object.ceTimestamp); + } + return message; + }; + + /** + * Creates a plain object from a CloudEventAttributeValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} message CloudEventAttributeValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudEventAttributeValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ceBoolean != null && message.hasOwnProperty("ceBoolean")) { + object.ceBoolean = message.ceBoolean; + if (options.oneofs) + object.attr = "ceBoolean"; + } + if (message.ceInteger != null && message.hasOwnProperty("ceInteger")) { + object.ceInteger = message.ceInteger; + if (options.oneofs) + object.attr = "ceInteger"; + } + if (message.ceString != null && message.hasOwnProperty("ceString")) { + object.ceString = message.ceString; + if (options.oneofs) + object.attr = "ceString"; + } + if (message.ceBytes != null && message.hasOwnProperty("ceBytes")) { + object.ceBytes = options.bytes === String ? $util.base64.encode(message.ceBytes, 0, message.ceBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.ceBytes) : message.ceBytes; + if (options.oneofs) + object.attr = "ceBytes"; + } + if (message.ceUri != null && message.hasOwnProperty("ceUri")) { + object.ceUri = message.ceUri; + if (options.oneofs) + object.attr = "ceUri"; + } + if (message.ceUriRef != null && message.hasOwnProperty("ceUriRef")) { + object.ceUriRef = message.ceUriRef; + if (options.oneofs) + object.attr = "ceUriRef"; + } + if (message.ceTimestamp != null && message.hasOwnProperty("ceTimestamp")) { + object.ceTimestamp = $root.google.protobuf.Timestamp.toObject(message.ceTimestamp, options); + if (options.oneofs) + object.attr = "ceTimestamp"; + } + return object; + }; + + /** + * Converts this CloudEventAttributeValue to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + * @returns {Object.} JSON object + */ + CloudEventAttributeValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudEventAttributeValue + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudEventAttributeValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue"; + }; + + return CloudEventAttributeValue; + })(); + + return CloudEvent; + })(); + + v1.Publisher = (function() { + + /** + * Constructs a new Publisher service. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a Publisher + * @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 Publisher(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Publisher.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Publisher; + + /** + * Creates new Publisher service using the specified rpc implementation. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @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 {Publisher} RPC service. Useful where requests and/or responses are streamed. + */ + Publisher.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishChannelConnectionEvents}. + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @typedef PublishChannelConnectionEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} [response] PublishChannelConnectionEventsResponse + */ + + /** + * Calls PublishChannelConnectionEvents. + * @function publishChannelConnectionEvents + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} request PublishChannelConnectionEventsRequest message or plain object + * @param {google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEventsCallback} callback Node-style callback called with the error, if any, and PublishChannelConnectionEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Publisher.prototype.publishChannelConnectionEvents = function publishChannelConnectionEvents(request, callback) { + return this.rpcCall(publishChannelConnectionEvents, $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse, request, callback); + }, "name", { value: "PublishChannelConnectionEvents" }); + + /** + * Calls PublishChannelConnectionEvents. + * @function publishChannelConnectionEvents + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} request PublishChannelConnectionEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishEvents}. + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @typedef PublishEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.publishing.v1.PublishEventsResponse} [response] PublishEventsResponse + */ + + /** + * Calls PublishEvents. + * @function publishEvents + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} request PublishEventsRequest message or plain object + * @param {google.cloud.eventarc.publishing.v1.Publisher.PublishEventsCallback} callback Node-style callback called with the error, if any, and PublishEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Publisher.prototype.publishEvents = function publishEvents(request, callback) { + return this.rpcCall(publishEvents, $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest, $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse, request, callback); + }, "name", { value: "PublishEvents" }); + + /** + * Calls PublishEvents. + * @function publishEvents + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} request PublishEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publish}. + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @typedef PublishCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.publishing.v1.PublishResponse} [response] PublishResponse + */ + + /** + * Calls Publish. + * @function publish + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} request PublishRequest message or plain object + * @param {google.cloud.eventarc.publishing.v1.Publisher.PublishCallback} callback Node-style callback called with the error, if any, and PublishResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Publisher.prototype.publish = function publish(request, callback) { + return this.rpcCall(publish, $root.google.cloud.eventarc.publishing.v1.PublishRequest, $root.google.cloud.eventarc.publishing.v1.PublishResponse, request, callback); + }, "name", { value: "Publish" }); + + /** + * Calls Publish. + * @function publish + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} request PublishRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Publisher; + })(); + + v1.PublishChannelConnectionEventsRequest = (function() { + + /** + * Properties of a PublishChannelConnectionEventsRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishChannelConnectionEventsRequest + * @property {string|null} [channelConnection] PublishChannelConnectionEventsRequest channelConnection + * @property {Array.|null} [events] PublishChannelConnectionEventsRequest events + * @property {Array.|null} [textEvents] PublishChannelConnectionEventsRequest textEvents + */ + + /** + * Constructs a new PublishChannelConnectionEventsRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishChannelConnectionEventsRequest. + * @implements IPublishChannelConnectionEventsRequest + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest=} [properties] Properties to set + */ + function PublishChannelConnectionEventsRequest(properties) { + this.events = []; + this.textEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublishChannelConnectionEventsRequest channelConnection. + * @member {string} channelConnection + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @instance + */ + PublishChannelConnectionEventsRequest.prototype.channelConnection = ""; + + /** + * PublishChannelConnectionEventsRequest events. + * @member {Array.} events + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @instance + */ + PublishChannelConnectionEventsRequest.prototype.events = $util.emptyArray; + + /** + * PublishChannelConnectionEventsRequest textEvents. + * @member {Array.} textEvents + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @instance + */ + PublishChannelConnectionEventsRequest.prototype.textEvents = $util.emptyArray; + + /** + * Creates a new PublishChannelConnectionEventsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest instance + */ + PublishChannelConnectionEventsRequest.create = function create(properties) { + return new PublishChannelConnectionEventsRequest(properties); + }; + + /** + * Encodes the specified PublishChannelConnectionEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} message PublishChannelConnectionEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishChannelConnectionEventsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channelConnection != null && Object.hasOwnProperty.call(message, "channelConnection")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.channelConnection); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.google.protobuf.Any.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textEvents != null && message.textEvents.length) + for (var i = 0; i < message.textEvents.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textEvents[i]); + return writer; + }; + + /** + * Encodes the specified PublishChannelConnectionEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} message PublishChannelConnectionEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishChannelConnectionEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishChannelConnectionEventsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channelConnection = reader.string(); + break; + } + case 2: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.textEvents && message.textEvents.length)) + message.textEvents = []; + message.textEvents.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishChannelConnectionEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishChannelConnectionEventsRequest message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishChannelConnectionEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) + if (!$util.isString(message.channelConnection)) + return "channelConnection: string expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.textEvents != null && message.hasOwnProperty("textEvents")) { + if (!Array.isArray(message.textEvents)) + return "textEvents: array expected"; + for (var i = 0; i < message.textEvents.length; ++i) + if (!$util.isString(message.textEvents[i])) + return "textEvents: string[] expected"; + } + return null; + }; + + /** + * Creates a PublishChannelConnectionEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest + */ + PublishChannelConnectionEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(); + if (object.channelConnection != null) + message.channelConnection = String(object.channelConnection); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.events: object expected"); + message.events[i] = $root.google.protobuf.Any.fromObject(object.events[i]); + } + } + if (object.textEvents) { + if (!Array.isArray(object.textEvents)) + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.textEvents: array expected"); + message.textEvents = []; + for (var i = 0; i < object.textEvents.length; ++i) + message.textEvents[i] = String(object.textEvents[i]); + } + return message; + }; + + /** + * Creates a plain object from a PublishChannelConnectionEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} message PublishChannelConnectionEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishChannelConnectionEventsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.events = []; + object.textEvents = []; + } + if (options.defaults) + object.channelConnection = ""; + if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) + object.channelConnection = message.channelConnection; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.google.protobuf.Any.toObject(message.events[j], options); + } + if (message.textEvents && message.textEvents.length) { + object.textEvents = []; + for (var j = 0; j < message.textEvents.length; ++j) + object.textEvents[j] = message.textEvents[j]; + } + return object; + }; + + /** + * Converts this PublishChannelConnectionEventsRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @instance + * @returns {Object.} JSON object + */ + PublishChannelConnectionEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishChannelConnectionEventsRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishChannelConnectionEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest"; + }; + + return PublishChannelConnectionEventsRequest; + })(); + + v1.PublishChannelConnectionEventsResponse = (function() { + + /** + * Properties of a PublishChannelConnectionEventsResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishChannelConnectionEventsResponse + */ + + /** + * Constructs a new PublishChannelConnectionEventsResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishChannelConnectionEventsResponse. + * @implements IPublishChannelConnectionEventsResponse + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse=} [properties] Properties to set + */ + function PublishChannelConnectionEventsResponse(properties) { + if (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 PublishChannelConnectionEventsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse instance + */ + PublishChannelConnectionEventsResponse.create = function create(properties) { + return new PublishChannelConnectionEventsResponse(properties); + }; + + /** + * Encodes the specified PublishChannelConnectionEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse} message PublishChannelConnectionEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishChannelConnectionEventsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishChannelConnectionEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse} message PublishChannelConnectionEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishChannelConnectionEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishChannelConnectionEventsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishChannelConnectionEventsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishChannelConnectionEventsResponse message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishChannelConnectionEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PublishChannelConnectionEventsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse + */ + PublishChannelConnectionEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) + return object; + return new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(); + }; + + /** + * Creates a plain object from a PublishChannelConnectionEventsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} message PublishChannelConnectionEventsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishChannelConnectionEventsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishChannelConnectionEventsResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @instance + * @returns {Object.} JSON object + */ + PublishChannelConnectionEventsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishChannelConnectionEventsResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishChannelConnectionEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse"; + }; + + return PublishChannelConnectionEventsResponse; + })(); + + v1.PublishEventsRequest = (function() { + + /** + * Properties of a PublishEventsRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishEventsRequest + * @property {string|null} [channel] PublishEventsRequest channel + * @property {Array.|null} [events] PublishEventsRequest events + * @property {Array.|null} [textEvents] PublishEventsRequest textEvents + */ + + /** + * Constructs a new PublishEventsRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishEventsRequest. + * @implements IPublishEventsRequest + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest=} [properties] Properties to set + */ + function PublishEventsRequest(properties) { + this.events = []; + this.textEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublishEventsRequest channel. + * @member {string} channel + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @instance + */ + PublishEventsRequest.prototype.channel = ""; + + /** + * PublishEventsRequest events. + * @member {Array.} events + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @instance + */ + PublishEventsRequest.prototype.events = $util.emptyArray; + + /** + * PublishEventsRequest textEvents. + * @member {Array.} textEvents + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @instance + */ + PublishEventsRequest.prototype.textEvents = $util.emptyArray; + + /** + * Creates a new PublishEventsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest instance + */ + PublishEventsRequest.create = function create(properties) { + return new PublishEventsRequest(properties); + }; + + /** + * Encodes the specified PublishEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} message PublishEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishEventsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.google.protobuf.Any.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textEvents != null && message.textEvents.length) + for (var i = 0; i < message.textEvents.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.textEvents[i]); + return writer; + }; + + /** + * Encodes the specified PublishEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} message PublishEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishEventsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.channel = reader.string(); + break; + } + case 2: { + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.textEvents && message.textEvents.length)) + message.textEvents = []; + message.textEvents.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishEventsRequest message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) + if (!$util.isString(message.channel)) + return "channel: string expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.textEvents != null && message.hasOwnProperty("textEvents")) { + if (!Array.isArray(message.textEvents)) + return "textEvents: array expected"; + for (var i = 0; i < message.textEvents.length; ++i) + if (!$util.isString(message.textEvents[i])) + return "textEvents: string[] expected"; + } + return null; + }; + + /** + * Creates a PublishEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest + */ + PublishEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest(); + if (object.channel != null) + message.channel = String(object.channel); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishEventsRequest.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishEventsRequest.events: object expected"); + message.events[i] = $root.google.protobuf.Any.fromObject(object.events[i]); + } + } + if (object.textEvents) { + if (!Array.isArray(object.textEvents)) + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishEventsRequest.textEvents: array expected"); + message.textEvents = []; + for (var i = 0; i < object.textEvents.length; ++i) + message.textEvents[i] = String(object.textEvents[i]); + } + return message; + }; + + /** + * Creates a plain object from a PublishEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishEventsRequest} message PublishEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishEventsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.events = []; + object.textEvents = []; + } + if (options.defaults) + object.channel = ""; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = message.channel; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.google.protobuf.Any.toObject(message.events[j], options); + } + if (message.textEvents && message.textEvents.length) { + object.textEvents = []; + for (var j = 0; j < message.textEvents.length; ++j) + object.textEvents[j] = message.textEvents[j]; + } + return object; + }; + + /** + * Converts this PublishEventsRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @instance + * @returns {Object.} JSON object + */ + PublishEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishEventsRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishEventsRequest"; + }; + + return PublishEventsRequest; + })(); + + v1.PublishEventsResponse = (function() { + + /** + * Properties of a PublishEventsResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishEventsResponse + */ + + /** + * Constructs a new PublishEventsResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishEventsResponse. + * @implements IPublishEventsResponse + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse=} [properties] Properties to set + */ + function PublishEventsResponse(properties) { + if (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 PublishEventsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse instance + */ + PublishEventsResponse.create = function create(properties) { + return new PublishEventsResponse(properties); + }; + + /** + * Encodes the specified PublishEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse} message PublishEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishEventsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse} message PublishEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishEventsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishEventsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishEventsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishEventsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishEventsResponse message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PublishEventsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse + */ + PublishEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse) + return object; + return new $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse(); + }; + + /** + * Creates a plain object from a PublishEventsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishEventsResponse} message PublishEventsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishEventsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishEventsResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @instance + * @returns {Object.} JSON object + */ + PublishEventsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishEventsResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishEventsResponse"; + }; + + return PublishEventsResponse; + })(); + + v1.PublishRequest = (function() { + + /** + * Properties of a PublishRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishRequest + * @property {string|null} [messageBus] PublishRequest messageBus + * @property {google.cloud.eventarc.publishing.v1.ICloudEvent|null} [protoMessage] PublishRequest protoMessage + * @property {string|null} [jsonMessage] PublishRequest jsonMessage + * @property {Uint8Array|null} [avroMessage] PublishRequest avroMessage + */ + + /** + * Constructs a new PublishRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishRequest. + * @implements IPublishRequest + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest=} [properties] Properties to set + */ + function PublishRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublishRequest messageBus. + * @member {string} messageBus + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.messageBus = ""; + + /** + * PublishRequest protoMessage. + * @member {google.cloud.eventarc.publishing.v1.ICloudEvent|null|undefined} protoMessage + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.protoMessage = null; + + /** + * PublishRequest jsonMessage. + * @member {string|null|undefined} jsonMessage + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.jsonMessage = null; + + /** + * PublishRequest avroMessage. + * @member {Uint8Array|null|undefined} avroMessage + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.avroMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PublishRequest format. + * @member {"protoMessage"|"jsonMessage"|"avroMessage"|undefined} format + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + Object.defineProperty(PublishRequest.prototype, "format", { + get: $util.oneOfGetter($oneOfFields = ["protoMessage", "jsonMessage", "avroMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PublishRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest instance + */ + PublishRequest.create = function create(properties) { + return new PublishRequest(properties); + }; + + /** + * Encodes the specified PublishRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} message PublishRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageBus != null && Object.hasOwnProperty.call(message, "messageBus")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageBus); + if (message.protoMessage != null && Object.hasOwnProperty.call(message, "protoMessage")) + $root.google.cloud.eventarc.publishing.v1.CloudEvent.encode(message.protoMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jsonMessage != null && Object.hasOwnProperty.call(message, "jsonMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jsonMessage); + if (message.avroMessage != null && Object.hasOwnProperty.call(message, "avroMessage")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.avroMessage); + return writer; + }; + + /** + * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} message PublishRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageBus = reader.string(); + break; + } + case 2: { + message.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.decode(reader, reader.uint32()); + break; + } + case 3: { + message.jsonMessage = reader.string(); + break; + } + case 4: { + message.avroMessage = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishRequest message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + if (!$util.isString(message.messageBus)) + return "messageBus: string expected"; + if (message.protoMessage != null && message.hasOwnProperty("protoMessage")) { + properties.format = 1; + { + var error = $root.google.cloud.eventarc.publishing.v1.CloudEvent.verify(message.protoMessage); + if (error) + return "protoMessage." + error; + } + } + if (message.jsonMessage != null && message.hasOwnProperty("jsonMessage")) { + if (properties.format === 1) + return "format: multiple values"; + properties.format = 1; + if (!$util.isString(message.jsonMessage)) + return "jsonMessage: string expected"; + } + if (message.avroMessage != null && message.hasOwnProperty("avroMessage")) { + if (properties.format === 1) + return "format: multiple values"; + properties.format = 1; + if (!(message.avroMessage && typeof message.avroMessage.length === "number" || $util.isString(message.avroMessage))) + return "avroMessage: buffer expected"; + } + return null; + }; + + /** + * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest + */ + PublishRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishRequest) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.PublishRequest(); + if (object.messageBus != null) + message.messageBus = String(object.messageBus); + if (object.protoMessage != null) { + if (typeof object.protoMessage !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishRequest.protoMessage: object expected"); + message.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.fromObject(object.protoMessage); + } + if (object.jsonMessage != null) + message.jsonMessage = String(object.jsonMessage); + if (object.avroMessage != null) + if (typeof object.avroMessage === "string") + $util.base64.decode(object.avroMessage, message.avroMessage = $util.newBuffer($util.base64.length(object.avroMessage)), 0); + else if (object.avroMessage.length >= 0) + message.avroMessage = object.avroMessage; + return message; + }; + + /** + * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishRequest} message PublishRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.messageBus = ""; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + object.messageBus = message.messageBus; + if (message.protoMessage != null && message.hasOwnProperty("protoMessage")) { + object.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.toObject(message.protoMessage, options); + if (options.oneofs) + object.format = "protoMessage"; + } + if (message.jsonMessage != null && message.hasOwnProperty("jsonMessage")) { + object.jsonMessage = message.jsonMessage; + if (options.oneofs) + object.format = "jsonMessage"; + } + if (message.avroMessage != null && message.hasOwnProperty("avroMessage")) { + object.avroMessage = options.bytes === String ? $util.base64.encode(message.avroMessage, 0, message.avroMessage.length) : options.bytes === Array ? Array.prototype.slice.call(message.avroMessage) : message.avroMessage; + if (options.oneofs) + object.format = "avroMessage"; + } + return object; + }; + + /** + * Converts this PublishRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + * @returns {Object.} JSON object + */ + PublishRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishRequest"; + }; + + return PublishRequest; + })(); + + v1.PublishResponse = (function() { + + /** + * Properties of a PublishResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishResponse + */ + + /** + * Constructs a new PublishResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishResponse. + * @implements IPublishResponse + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse=} [properties] Properties to set + */ + function PublishResponse(properties) { + if (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 PublishResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse instance + */ + PublishResponse.create = function create(properties) { + return new PublishResponse(properties); + }; + + /** + * Encodes the specified PublishResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse} message PublishResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse} message PublishResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishResponse message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse + */ + PublishResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishResponse) + return object; + return new $root.google.cloud.eventarc.publishing.v1.PublishResponse(); + }; + + /** + * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishResponse} message PublishResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @instance + * @returns {Object.} JSON object + */ + PublishResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishResponse"; + }; + + return PublishResponse; + })(); + + return v1; + })(); + + return publishing; + })(); + + return eventarc; + })(); + + 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.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; + })(); + + 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; + })(); + + 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 + */ + + /** + * 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 = []; + if (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; + + /** + * 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(); + 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; + } + 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; + } + } + 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]); + } + } + 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 = []; + 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); + } + 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 + */ + + /** + * 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; + + /** + * 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(); + 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; + } + 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; + } + } + 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]); + } + } + 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; + } + 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); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * 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.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + 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.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.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 + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + 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.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.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.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; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json new file mode 100644 index 00000000000..f4956478fb5 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json @@ -0,0 +1,2057 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "eventarc": { + "nested": { + "publishing": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Eventarc.Publishing.V1", + "go_package": "cloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb", + "java_multiple_files": true, + "java_outer_classname": "PublisherProto", + "java_package": "com.google.cloud.eventarc.publishing.v1", + "php_namespace": "Google\\Cloud\\Eventarc\\Publishing\\V1", + "ruby_package": "Google::Cloud::Eventarc::Publishing::V1" + }, + "nested": { + "CloudEvent": { + "oneofs": { + "data": { + "oneof": [ + "binaryData", + "textData", + "protoData" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "source": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "specVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "attributes": { + "keyType": "string", + "type": "CloudEventAttributeValue", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "binaryData": { + "type": "bytes", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "textData": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "protoData": { + "type": "google.protobuf.Any", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CloudEventAttributeValue": { + "oneofs": { + "attr": { + "oneof": [ + "ceBoolean", + "ceInteger", + "ceString", + "ceBytes", + "ceUri", + "ceUriRef", + "ceTimestamp" + ] + } + }, + "fields": { + "ceBoolean": { + "type": "bool", + "id": 1 + }, + "ceInteger": { + "type": "int32", + "id": 2 + }, + "ceString": { + "type": "string", + "id": 3 + }, + "ceBytes": { + "type": "bytes", + "id": 4 + }, + "ceUri": { + "type": "string", + "id": 5 + }, + "ceUriRef": { + "type": "string", + "id": 6 + }, + "ceTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 7 + } + } + } + } + }, + "Publisher": { + "options": { + "(google.api.default_host)": "eventarcpublishing.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "PublishChannelConnectionEvents": { + "requestType": "PublishChannelConnectionEventsRequest", + "responseType": "PublishChannelConnectionEventsResponse", + "options": { + "(google.api.http).post": "/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents", + "body": "*" + } + } + ] + }, + "PublishEvents": { + "requestType": "PublishEventsRequest", + "responseType": "PublishEventsResponse", + "options": { + "(google.api.http).post": "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents", + "body": "*" + } + } + ] + }, + "Publish": { + "requestType": "PublishRequest", + "responseType": "PublishResponse", + "options": { + "(google.api.http).post": "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish", + "body": "*" + } + } + ] + } + } + }, + "PublishChannelConnectionEventsRequest": { + "fields": { + "channelConnection": { + "type": "string", + "id": 1 + }, + "events": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 2 + }, + "textEvents": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "PublishChannelConnectionEventsResponse": { + "fields": {} + }, + "PublishEventsRequest": { + "fields": { + "channel": { + "type": "string", + "id": 1 + }, + "events": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 2 + }, + "textEvents": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "PublishEventsResponse": { + "fields": {} + }, + "PublishRequest": { + "oneofs": { + "format": { + "oneof": [ + "protoMessage", + "jsonMessage", + "avroMessage" + ] + } + }, + "fields": { + "messageBus": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protoMessage": { + "type": "CloudEvent", + "id": 2 + }, + "jsonMessage": { + "type": "string", + "id": 3 + }, + "avroMessage": { + "type": "bytes", + "id": 4 + } + } + }, + "PublishResponse": { + "fields": {} + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "FieldInfoProto", + "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 + } + }, + "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 + } + }, + "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 + } + } + } + } + } + }, + "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 + } + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish.js new file mode 100644 index 00000000000..e32138911d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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(messageBus) { + // [START eventarcpublishing_v1_generated_Publisher_Publish_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 full name of the message bus to publish events to. Format: + * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + */ + // const messageBus = 'abc123' + /** + * The Protobuf format of the CloudEvent being published. Specification can + * be found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + */ + // const protoMessage = {} + /** + * The JSON format of the CloudEvent being published. Specification can be + * found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + */ + // const jsonMessage = 'abc123' + /** + * The Avro format of the CloudEvent being published. Specification can + * be found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + */ + // const avroMessage = Buffer.from('string') + + // Imports the Publishing library + const {PublisherClient} = require('@google-cloud/eventarc-publishing').v1; + + // Instantiates a client + const publishingClient = new PublisherClient(); + + async function callPublish() { + // Construct request + const request = { + messageBus, + }; + + // Run request + const response = await publishingClient.publish(request); + console.log(response); + } + + callPublish(); + // [END eventarcpublishing_v1_generated_Publisher_Publish_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-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js new file mode 100644 index 00000000000..efae9b737e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_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. + */ + /** + * The channel_connection that the events are published from. For example: + * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + */ + // const channelConnection = 'abc123' + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + */ + // const events = [1,2,3,4] + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + */ + // const textEvents = ['abc','def'] + + // Imports the Publishing library + const {PublisherClient} = require('@google-cloud/eventarc-publishing').v1; + + // Instantiates a client + const publishingClient = new PublisherClient(); + + async function callPublishChannelConnectionEvents() { + // Construct request + const request = { + }; + + // Run request + const response = await publishingClient.publishChannelConnectionEvents(request); + console.log(response); + } + + callPublishChannelConnectionEvents(); + // [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_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-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js new file mode 100644 index 00000000000..389b5611c05 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START eventarcpublishing_v1_generated_Publisher_PublishEvents_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. + */ + /** + * The full name of the channel to publish to. For example: + * `projects/{project}/locations/{location}/channels/{channel-id}`. + */ + // const channel = 'abc123' + /** + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + */ + // const events = [1,2,3,4] + /** + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + */ + // const textEvents = ['abc','def'] + + // Imports the Publishing library + const {PublisherClient} = require('@google-cloud/eventarc-publishing').v1; + + // Instantiates a client + const publishingClient = new PublisherClient(); + + async function callPublishEvents() { + // Construct request + const request = { + }; + + // Run request + const response = await publishingClient.publishEvents(request); + console.log(response); + } + + callPublishEvents(); + // [END eventarcpublishing_v1_generated_Publisher_PublishEvents_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-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json new file mode 100644 index 00000000000..9a134183930 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json @@ -0,0 +1,163 @@ +{ + "clientLibrary": { + "name": "nodejs-publishing", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.eventarc.publishing.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_async", + "title": "Publisher publishChannelConnectionEvents Sample", + "origin": "API_DEFINITION", + "description": " Publish events to a ChannelConnection in a partner's project.", + "canonical": true, + "file": "publisher.publish_channel_connection_events.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PublishChannelConnectionEvents", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", + "async": true, + "parameters": [ + { + "name": "channel_connection", + "type": "TYPE_STRING" + }, + { + "name": "events", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "text_events", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse", + "client": { + "shortName": "PublisherClient", + "fullName": "google.cloud.eventarc.publishing.v1.PublisherClient" + }, + "method": { + "shortName": "PublishChannelConnectionEvents", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", + "service": { + "shortName": "Publisher", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher" + } + } + } + }, + { + "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishEvents_async", + "title": "Publisher publishEvents Sample", + "origin": "API_DEFINITION", + "description": " Publish events to a subscriber's channel.", + "canonical": true, + "file": "publisher.publish_events.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PublishEvents", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", + "async": true, + "parameters": [ + { + "name": "channel", + "type": "TYPE_STRING" + }, + { + "name": "events", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "text_events", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.eventarc.publishing.v1.PublishEventsResponse", + "client": { + "shortName": "PublisherClient", + "fullName": "google.cloud.eventarc.publishing.v1.PublisherClient" + }, + "method": { + "shortName": "PublishEvents", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", + "service": { + "shortName": "Publisher", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher" + } + } + } + }, + { + "regionTag": "eventarcpublishing_v1_generated_Publisher_Publish_async", + "title": "Publisher publish Sample", + "origin": "API_DEFINITION", + "description": " Publish events to a message bus.", + "canonical": true, + "file": "publisher.publish.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "Publish", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.Publish", + "async": true, + "parameters": [ + { + "name": "message_bus", + "type": "TYPE_STRING" + }, + { + "name": "proto_message", + "type": ".google.cloud.eventarc.publishing.v1.CloudEvent" + }, + { + "name": "json_message", + "type": "TYPE_STRING" + }, + { + "name": "avro_message", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.eventarc.publishing.v1.PublishResponse", + "client": { + "shortName": "PublisherClient", + "fullName": "google.cloud.eventarc.publishing.v1.PublisherClient" + }, + "method": { + "shortName": "Publish", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.Publish", + "service": { + "shortName": "Publisher", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/index.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/index.ts new file mode 100644 index 00000000000..f0fe1131fd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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 PublisherClient = v1.PublisherClient; +type PublisherClient = v1.PublisherClient; +export {v1, PublisherClient}; +export default {v1, PublisherClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..ec79a2d0cd8 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.eventarc.publishing.v1", + "libraryPackage": "@google-cloud/eventarc-publishing", + "services": { + "Publisher": { + "clients": { + "grpc": { + "libraryClient": "PublisherClient", + "rpcs": { + "PublishChannelConnectionEvents": { + "methods": [ + "publishChannelConnectionEvents" + ] + }, + "PublishEvents": { + "methods": [ + "publishEvents" + ] + }, + "Publish": { + "methods": [ + "publish" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "PublisherClient", + "rpcs": { + "PublishChannelConnectionEvents": { + "methods": [ + "publishChannelConnectionEvents" + ] + }, + "PublishEvents": { + "methods": [ + "publishEvents" + ] + }, + "Publish": { + "methods": [ + "publish" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/index.ts new file mode 100644 index 00000000000..fe93c45dfe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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 {PublisherClient} from './publisher_client'; diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts new file mode 100644 index 00000000000..e7036fa378f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts @@ -0,0 +1,600 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1/publisher_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './publisher_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Eventarc processes events generated by an event provider and delivers them to + * a subscriber. + * + * An event provider is a software-as-a-service (SaaS) system or + * product that can generate and deliver events through Eventarc. + * + * A third-party event provider is an event provider from outside of Google. + * + * A partner is a third-party event provider that is integrated with Eventarc. + * + * A subscriber is a GCP customer interested in receiving events. + * + * Channel is a first-class Eventarc resource that is created and managed + * by the subscriber in their GCP project. A Channel represents a subscriber's + * intent to receive events from an event provider. A Channel is associated with + * exactly one event provider. + * + * ChannelConnection is a first-class Eventarc resource that + * is created and managed by the partner in their GCP project. A + * ChannelConnection represents a connection between a partner and a + * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a + * Channel. + * + * Publisher allows an event provider to publish events to Eventarc. + * @class + * @memberof v1 + */ +export class PublisherClient { + 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}; + publisherStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of PublisherClient. + * + * @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 PublisherClient({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 PublisherClient; + 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 = 'eventarcpublishing.' + this._universeDomain; + const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.eventarc.publishing.v1.Publisher', 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.publisherStub) { + return this.publisherStub; + } + + // Put together the "service stub" for + // google.cloud.eventarc.publishing.v1.Publisher. + this.publisherStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.eventarc.publishing.v1.Publisher') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.eventarc.publishing.v1.Publisher, + 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 publisherStubMethods = + ['publishChannelConnectionEvents', 'publishEvents', 'publish']; + for (const methodName of publisherStubMethods) { + const callPromise = this.publisherStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.publisherStub; + } + + /** + * 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 'eventarcpublishing.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 'eventarcpublishing.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 -- + // ------------------- +/** + * Publish events to a ChannelConnection in a partner's project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.channelConnection + * The channel_connection that the events are published from. For example: + * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + * @param {number[]} request.events + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * @param {string[]} request.textEvents + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.eventarc.publishing.v1.PublishChannelConnectionEventsResponse|PublishChannelConnectionEventsResponse}. + * 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/publisher.publish_channel_connection_events.js + * region_tag:eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_async + */ + publishChannelConnectionEvents( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|undefined, {}|undefined + ]>; + publishChannelConnectionEvents( + request: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, + {}|null|undefined>): void; + publishChannelConnectionEvents( + request: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, + {}|null|undefined>): void; + publishChannelConnectionEvents( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'channel_connection': request.channelConnection ?? '', + }); + this.initialize(); + return this.innerApiCalls.publishChannelConnectionEvents(request, options, callback); + } +/** + * Publish events to a subscriber's channel. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.channel + * The full name of the channel to publish to. For example: + * `projects/{project}/locations/{location}/channels/{channel-id}`. + * @param {number[]} request.events + * The CloudEvents v1.0 events to publish. No other types are allowed. + * If this field is set, then the `text_events` fields must not be set. + * @param {string[]} request.textEvents + * The text representation of events to publish. + * CloudEvent v1.0 in JSON format is the only allowed type. Refer to + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * for specification. + * If this field is set, then the `events` fields must not be set. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.eventarc.publishing.v1.PublishEventsResponse|PublishEventsResponse}. + * 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/publisher.publish_events.js + * region_tag:eventarcpublishing_v1_generated_Publisher_PublishEvents_async + */ + publishEvents( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|undefined, {}|undefined + ]>; + publishEvents( + request: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, + {}|null|undefined>): void; + publishEvents( + request: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, + {}|null|undefined>): void; + publishEvents( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'channel': request.channel ?? '', + }); + this.initialize(); + return this.innerApiCalls.publishEvents(request, options, callback); + } +/** + * Publish events to a message bus. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.messageBus + * Required. The full name of the message bus to publish events to. Format: + * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + * @param {google.cloud.eventarc.publishing.v1.CloudEvent} request.protoMessage + * The Protobuf format of the CloudEvent being published. Specification can + * be found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + * @param {string} request.jsonMessage + * The JSON format of the CloudEvent being published. Specification can be + * found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * @param {Buffer} request.avroMessage + * The Avro format of the CloudEvent being published. Specification can + * be found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.eventarc.publishing.v1.PublishResponse|PublishResponse}. + * 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/publisher.publish.js + * region_tag:eventarcpublishing_v1_generated_Publisher_Publish_async + */ + publish( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest|undefined, {}|undefined + ]>; + publish( + request: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, + {}|null|undefined>): void; + publish( + request: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, + {}|null|undefined>): void; + publish( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'message_bus': request.messageBus ?? '', + }); + this.initialize(); + return this.innerApiCalls.publish(request, options, callback); + } + + + /** + * 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.publisherStub && !this._terminated) { + return this.publisherStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json new file mode 100644 index 00000000000..d364c8bb2b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json @@ -0,0 +1,40 @@ +{ + "interfaces": { + "google.cloud.eventarc.publishing.v1.Publisher": { + "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": { + "PublishChannelConnectionEvents": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PublishEvents": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "Publish": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json new file mode 100644 index 00000000000..d651cd130b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/eventarc/publishing/v1/cloud_event.proto", + "../../protos/google/cloud/eventarc/publishing/v1/publisher.proto" +] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..c3ba6bde1c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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 publishing = require('@google-cloud/eventarc-publishing'); + +function main() { + const publisherClient = new publishing.PublisherClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..975fda121d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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 {PublisherClient} from '@google-cloud/eventarc-publishing'; + +// check that the client class type name can be used +function doStuffWithPublisherClient(client: PublisherClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const publisherClient = new PublisherClient(); + doStuffWithPublisherClient(publisherClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/install.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/test/gapic_publisher_v1.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/test/gapic_publisher_v1.ts new file mode 100644 index 00000000000..8486b5c2c58 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/v1/test/gapic_publisher_v1.ts @@ -0,0 +1,538 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 publisherModule from '../src'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +describe('v1.PublisherClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new publisherModule.v1.PublisherClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'eventarcpublishing.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new publisherModule.v1.PublisherClient(); + 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 = publisherModule.v1.PublisherClient.servicePath; + assert.strictEqual(servicePath, 'eventarcpublishing.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = publisherModule.v1.PublisherClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'eventarcpublishing.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new publisherModule.v1.PublisherClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'eventarcpublishing.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new publisherModule.v1.PublisherClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'eventarcpublishing.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 publisherModule.v1.PublisherClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'eventarcpublishing.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 publisherModule.v1.PublisherClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'eventarcpublishing.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 publisherModule.v1.PublisherClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = publisherModule.v1.PublisherClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new publisherModule.v1.PublisherClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new publisherModule.v1.PublisherClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.publisherStub, undefined); + await client.initialize(); + assert(client.publisherStub); + }); + + it('has close method for the initialized client', done => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.publisherStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.publisherStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new publisherModule.v1.PublisherClient({ + 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 publisherModule.v1.PublisherClient({ + 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('publishChannelConnectionEvents', () => { + it('invokes publishChannelConnectionEvents without error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); + request.channelConnection = defaultValue1; + const expectedHeaderRequestParams = `channel_connection=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse() + ); + client.innerApiCalls.publishChannelConnectionEvents = stubSimpleCall(expectedResponse); + const [response] = await client.publishChannelConnectionEvents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publishChannelConnectionEvents without error using callback', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); + request.channelConnection = defaultValue1; + const expectedHeaderRequestParams = `channel_connection=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse() + ); + client.innerApiCalls.publishChannelConnectionEvents = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.publishChannelConnectionEvents( + request, + (err?: Error|null, result?: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publishChannelConnectionEvents with error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); + request.channelConnection = defaultValue1; + const expectedHeaderRequestParams = `channel_connection=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.publishChannelConnectionEvents = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.publishChannelConnectionEvents(request), expectedError); + const actualRequest = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publishChannelConnectionEvents with closed client', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); + request.channelConnection = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.publishChannelConnectionEvents(request), expectedError); + }); + }); + + describe('publishEvents', () => { + it('invokes publishEvents without error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); + request.channel = defaultValue1; + const expectedHeaderRequestParams = `channel=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishEventsResponse() + ); + client.innerApiCalls.publishEvents = stubSimpleCall(expectedResponse); + const [response] = await client.publishEvents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publishEvents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publishEvents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publishEvents without error using callback', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); + request.channel = defaultValue1; + const expectedHeaderRequestParams = `channel=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishEventsResponse() + ); + client.innerApiCalls.publishEvents = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.publishEvents( + request, + (err?: Error|null, result?: protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publishEvents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publishEvents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publishEvents with error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); + request.channel = defaultValue1; + const expectedHeaderRequestParams = `channel=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.publishEvents = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.publishEvents(request), expectedError); + const actualRequest = (client.innerApiCalls.publishEvents as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publishEvents as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publishEvents with closed client', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); + request.channel = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.publishEvents(request), expectedError); + }); + }); + + describe('publish', () => { + it('invokes publish without error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); + request.messageBus = defaultValue1; + const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishResponse() + ); + client.innerApiCalls.publish = stubSimpleCall(expectedResponse); + const [response] = await client.publish(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publish as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publish as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publish without error using callback', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); + request.messageBus = defaultValue1; + const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishResponse() + ); + client.innerApiCalls.publish = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.publish( + request, + (err?: Error|null, result?: protos.google.cloud.eventarc.publishing.v1.IPublishResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publish as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publish as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publish with error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); + request.messageBus = defaultValue1; + const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.publish = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.publish(request), expectedError); + const actualRequest = (client.innerApiCalls.publish as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.publish as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publish with closed client', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); + request.messageBus = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.publish(request), expectedError); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/tsconfig.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/webpack.config.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/webpack.config.js new file mode 100644 index 00000000000..6c9705ec65e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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: 'Publisher', + filename: './publisher.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-securitycentermanagement/v1/.eslintignore b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintrc.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/.gitignore b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/.jsdoc.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.jsdoc.js new file mode 100644 index 00000000000..61b4b8a20ef --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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/securitycentermanagement', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/.mocharc.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/.prettierrc.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/README.md b/owl-bot-staging/google-cloud-securitycentermanagement/v1/README.md new file mode 100644 index 00000000000..c4f3fec2035 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/README.md @@ -0,0 +1 @@ +Securitycentermanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json new file mode 100644 index 00000000000..73b37062d3a --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/securitycentermanagement", + "version": "0.1.0", + "description": "Securitycentermanagement client for Node.js", + "repository": "googleapis/nodejs-securitycentermanagement", + "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 securitycentermanagement", + "securitycentermanagement", + "security center management" + ], + "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-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto new file mode 100644 index 00000000000..ff623fef501 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto @@ -0,0 +1,1796 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.securitycentermanagement.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.SecurityCenterManagement.V1"; +option go_package = "cloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb;securitycentermanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "SecurityCenterManagementProto"; +option java_package = "com.google.cloud.securitycentermanagement.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenterManagement\\V1"; +option ruby_package = "Google::Cloud::SecurityCenterManagement::V1"; +option (google.api.resource_definition) = { + type: "securitycentermanagement.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; +option (google.api.resource_definition) = { + type: "securitycentermanagement.googleapis.com/FolderLocation" + pattern: "folders/{folder}/locations/{location}" +}; + +// Service describing handlers for resources +service SecurityCenterManagement { + option (google.api.default_host) = "securitycentermanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns a list of all + // [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] + // resources for the given parent. This includes resident modules defined at + // the scope of the parent, and inherited modules, inherited from ancestor + // organizations, folders, and projects (no descendants). + rpc ListEffectiveSecurityHealthAnalyticsCustomModules( + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) + returns (ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" + } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single + // [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule]. + rpc GetEffectiveSecurityHealthAnalyticsCustomModule( + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) + returns (EffectiveSecurityHealthAnalyticsCustomModule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" + } + additional_bindings { + get: "/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of all + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // resources for the given parent. This includes resident modules defined at + // the scope of the parent, and inherited modules, inherited from ancestor + // organizations, folders, and projects (no descendants). + rpc ListSecurityHealthAnalyticsCustomModules( + ListSecurityHealthAnalyticsCustomModulesRequest) + returns (ListSecurityHealthAnalyticsCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules" + } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Returns a list of all resident + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // resources under the given organization, folder, or project and all of its + // descendants. + rpc ListDescendantSecurityHealthAnalyticsCustomModules( + ListDescendantSecurityHealthAnalyticsCustomModulesRequest) + returns (ListDescendantSecurityHealthAnalyticsCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" + } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule]. + rpc GetSecurityHealthAnalyticsCustomModule( + GetSecurityHealthAnalyticsCustomModuleRequest) + returns (SecurityHealthAnalyticsCustomModule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" + } + additional_bindings { + get: "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a resident + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // at the scope of the given organization, folder, or project, and also + // creates inherited `SecurityHealthAnalyticsCustomModule` resources for all + // folders and projects that are descendants of the given parent. These + // modules are enabled by default. + rpc CreateSecurityHealthAnalyticsCustomModule( + CreateSecurityHealthAnalyticsCustomModuleRequest) + returns (SecurityHealthAnalyticsCustomModule) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules" + body: "security_health_analytics_custom_module" + additional_bindings { + post: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules" + body: "security_health_analytics_custom_module" + } + additional_bindings { + post: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules" + body: "security_health_analytics_custom_module" + } + }; + option (google.api.method_signature) = + "parent,security_health_analytics_custom_module"; + } + + // Updates the + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // under the given name based on the given update mask. Updating the + // enablement state is supported on both resident and inherited modules + // (though resident modules cannot have an enablement state of "inherited"). + // Updating the display name and custom configuration of a module is supported + // on resident modules only. + rpc UpdateSecurityHealthAnalyticsCustomModule( + UpdateSecurityHealthAnalyticsCustomModuleRequest) + returns (SecurityHealthAnalyticsCustomModule) { + option (google.api.http) = { + patch: "/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}" + body: "security_health_analytics_custom_module" + additional_bindings { + patch: "/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" + body: "security_health_analytics_custom_module" + } + additional_bindings { + patch: "/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" + body: "security_health_analytics_custom_module" + } + }; + option (google.api.method_signature) = + "security_health_analytics_custom_module,update_mask"; + } + + // Deletes the specified + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // and all of its descendants in the resource hierarchy. This method is only + // supported for resident custom modules. + rpc DeleteSecurityHealthAnalyticsCustomModule( + DeleteSecurityHealthAnalyticsCustomModuleRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}" + additional_bindings { + delete: "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" + } + additional_bindings { + delete: "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Simulates the result of using a + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // to check a resource. + rpc SimulateSecurityHealthAnalyticsCustomModule( + SimulateSecurityHealthAnalyticsCustomModuleRequest) + returns (SimulateSecurityHealthAnalyticsCustomModuleResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate" + body: "*" + additional_bindings { + post: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate" + body: "*" + } + }; + option (google.api.method_signature) = "parent,custom_config,resource"; + } + + // Lists all effective Event Threat Detection custom modules for the + // given parent. This includes resident modules defined at the scope of the + // parent along with modules inherited from its ancestors. + rpc ListEffectiveEventThreatDetectionCustomModules( + ListEffectiveEventThreatDetectionCustomModulesRequest) + returns (ListEffectiveEventThreatDetectionCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModules" + } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the effective Event Threat Detection custom module at the given level. + // + // The difference between an + // [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] + // and an + // [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] + // is that the fields for an `EffectiveEventThreatDetectionCustomModule` are + // computed from ancestors if needed. For example, the enablement state for an + // `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or + // `INHERITED`. In contrast, the enablement state for an + // `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` + // or `DISABLED`. + rpc GetEffectiveEventThreatDetectionCustomModule( + GetEffectiveEventThreatDetectionCustomModuleRequest) + returns (EffectiveEventThreatDetectionCustomModule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" + } + additional_bindings { + get: "/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists all Event Threat Detection custom modules for the given organization, + // folder, or project. This includes resident modules defined at the scope of + // the parent along with modules inherited from ancestors. + rpc ListEventThreatDetectionCustomModules( + ListEventThreatDetectionCustomModulesRequest) + returns (ListEventThreatDetectionCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules" + } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all resident Event Threat Detection custom modules for the given + // organization, folder, or project and its descendants. + rpc ListDescendantEventThreatDetectionCustomModules( + ListDescendantEventThreatDetectionCustomModulesRequest) + returns (ListDescendantEventThreatDetectionCustomModulesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" + } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets an Event Threat Detection custom module. + rpc GetEventThreatDetectionCustomModule( + GetEventThreatDetectionCustomModuleRequest) + returns (EventThreatDetectionCustomModule) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" + } + additional_bindings { + get: "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a resident Event Threat Detection custom module at the scope of the + // given organization, folder, or project, and creates inherited custom + // modules for all descendants of the given parent. These modules are enabled + // by default. + rpc CreateEventThreatDetectionCustomModule( + CreateEventThreatDetectionCustomModuleRequest) + returns (EventThreatDetectionCustomModule) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules" + body: "event_threat_detection_custom_module" + additional_bindings { + post: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules" + body: "event_threat_detection_custom_module" + } + additional_bindings { + post: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules" + body: "event_threat_detection_custom_module" + } + }; + option (google.api.method_signature) = + "parent,event_threat_detection_custom_module"; + } + + // Updates the Event Threat Detection custom module with the given name based + // on the given update mask. Updating the enablement state is supported for + // both resident and inherited modules (though resident modules cannot have an + // enablement state of "inherited"). Updating the display name or + // configuration of a module is supported for resident modules only. The type + // of a module cannot be changed. + rpc UpdateEventThreatDetectionCustomModule( + UpdateEventThreatDetectionCustomModuleRequest) + returns (EventThreatDetectionCustomModule) { + option (google.api.http) = { + patch: "/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}" + body: "event_threat_detection_custom_module" + additional_bindings { + patch: "/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" + body: "event_threat_detection_custom_module" + } + additional_bindings { + patch: "/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" + body: "event_threat_detection_custom_module" + } + }; + option (google.api.method_signature) = + "event_threat_detection_custom_module,update_mask"; + } + + // Deletes the specified Event Threat Detection custom module and all of its + // descendants in the resource hierarchy. This method is only supported for + // resident custom modules. + rpc DeleteEventThreatDetectionCustomModule( + DeleteEventThreatDetectionCustomModuleRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}" + additional_bindings { + delete: "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" + } + additional_bindings { + delete: "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Validates the given Event Threat Detection custom module. + rpc ValidateEventThreatDetectionCustomModule( + ValidateEventThreatDetectionCustomModuleRequest) + returns (ValidateEventThreatDetectionCustomModuleResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate" + body: "*" + additional_bindings { + post: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate" + body: "*" + } + additional_bindings { + post: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate" + body: "*" + } + }; + } + + // Gets service settings for the specified Security Command Center service. + rpc GetSecurityCenterService(GetSecurityCenterServiceRequest) + returns (SecurityCenterService) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/securityCenterServices/*}" + additional_bindings { + get: "/v1/{name=folders/*/locations/*/securityCenterServices/*}" + } + additional_bindings { + get: "/v1/{name=organizations/*/locations/*/securityCenterServices/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of all Security Command Center services for the given + // parent. + rpc ListSecurityCenterServices(ListSecurityCenterServicesRequest) + returns (ListSecurityCenterServicesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/securityCenterServices" + additional_bindings { + get: "/v1/{parent=folders/*/locations/*}/securityCenterServices" + } + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/securityCenterServices" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a Security Command Center service using the given update mask. + rpc UpdateSecurityCenterService(UpdateSecurityCenterServiceRequest) + returns (SecurityCenterService) { + option (google.api.http) = { + patch: "/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}" + body: "security_center_service" + additional_bindings { + patch: "/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}" + body: "security_center_service" + } + additional_bindings { + patch: "/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}" + body: "security_center_service" + } + }; + option (google.api.method_signature) = + "security_center_service,update_mask"; + } +} + +// Represents a particular Security Command Center service. This includes +// settings information such as top-level enablement in addition to individual +// module settings. Service settings can be configured at the organization, +// folder, or project level. Service settings at the organization or folder +// level are inherited by those in descendant folders and projects. +message SecurityCenterService { + option (google.api.resource) = { + type: "securitycentermanagement.googleapis.com/SecurityCenterService" + pattern: "projects/{project}/locations/{location}/securityCenterServices/{service}" + pattern: "folders/{folder}/locations/{location}/securityCenterServices/{service}" + pattern: "organizations/{organization}/locations/{location}/securityCenterServices/{service}" + plural: "securityCenterServices" + singular: "securityCenterService" + }; + + // The settings for individual modules. + message ModuleSettings { + // Optional. The intended enablement state for the module at its level of + // the resource hierarchy. + EnablementState intended_enablement_state = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The effective enablement state for the module at its level + // of the resource hierarchy. If the intended state is set to `INHERITED`, + // the effective state will be inherited from the enablement state of an + // ancestor. This state may differ from the intended enablement state due to + // billing eligibility or onboarding status. + EnablementState effective_enablement_state = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Represents the possible enablement states for a service or module. + enum EnablementState { + // Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // State is inherited from the parent resource. Valid as an intended + // enablement state, but not as an effective enablement state. + INHERITED = 1; + + // State is enabled. + ENABLED = 2; + + // State is disabled. + DISABLED = 3; + + // Security Command Center is configured to ingest findings from this + // service, but not to enable this service. This state indicates that + // Security Command Center is misconfigured. You can't set this state + // yourself. + INGEST_ONLY = 4; + } + + // Identifier. The name of the service, in one of the following formats: + // + // * `organizations/{organization}/locations/{location}/securityCenterServices/{service}` + // * `folders/{folder}/locations/{location}/securityCenterServices/{service}` + // * `projects/{project}/locations/{location}/securityCenterServices/{service}` + // + // The following values are valid for `{service}`: + // + // * `container-threat-detection` + // * `event-threat-detection` + // * `security-health-analytics` + // * `vm-threat-detection` + // * `web-security-scanner` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The intended enablement state for the service at its level of the + // resource hierarchy. A `DISABLED` state will override all module enablement + // states to `DISABLED`. + EnablementState intended_enablement_state = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The effective enablement state for the service at its level of + // the resource hierarchy. If the intended state is set to `INHERITED`, the + // effective state will be inherited from the enablement state of an ancestor. + // This state may differ from the intended enablement state due to billing + // eligibility or onboarding status. + EnablementState effective_enablement_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The module configurations, including the enablement state for the + // service's modules. The absence of a module in the map implies that its + // configuration is inherited from its parents. + map modules = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time the service was last updated. This could be due to an + // explicit user update or due to a side effect of another system change, such + // as billing subscription expiry. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Additional service-specific configuration. Not all services will + // utilize this field. + google.protobuf.Struct service_config = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The representation of a Security Health Analytics custom module at a +// specified level of the resource hierarchy: organization, folder, or project. +// If a custom module is inherited from an ancestor organization or folder, then +// the enablement state is set to the value that is effective in the parent, not +// to `INHERITED`. For example, if the module is enabled in an organization or +// folder, then the effective enablement state for the module is `ENABLED` in +// all descendant folders or projects. +message EffectiveSecurityHealthAnalyticsCustomModule { + option (google.api.resource) = { + type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" + pattern: "organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}" + pattern: "projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}" + pattern: "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}" + plural: "effectiveSecurityHealthAnalyticsCustomModules" + singular: "effectiveSecurityHealthAnalyticsCustomModule" + }; + + // The enablement state of the module. + enum EnablementState { + // Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // The module is enabled at the given level. + ENABLED = 1; + + // The module is disabled at the given level. + DISABLED = 2; + } + + // Identifier. The full resource name of the custom module, in one of the + // following formats: + // + // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The user-specified configuration for the module. + CustomConfig custom_config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective enablement state for the module at the given + // level of the hierarchy. + EnablementState enablement_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name for the custom module. The name must be + // between 1 and 128 characters, start with a lowercase letter, and contain + // alphanumeric characters or underscores only. + string display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules]. +message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest { + // Required. Name of parent to list effective custom modules, in one of the + // following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" + } + ]; + + // Optional. The maximum number of results to return in a single response. + // Default is 10, minimum is 1, maximum is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules]. +message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse { + // The list of effective Security Health Analytics custom modules. + repeated EffectiveSecurityHealthAnalyticsCustomModule + effective_security_health_analytics_custom_modules = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// Request message for +// [SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule]. +message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { + // Required. The full resource name of the custom module, specified in one of + // the following formats: + // + // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" + } + ]; +} + +// Represents an instance of a Security Health Analytics custom module, +// including its full module name, display name, enablement state, and last +// updated time. You can create a custom module at the organization, folder, or +// project level. Custom modules that you create at the organization or folder +// level are inherited by the descendant folders and projects. +message SecurityHealthAnalyticsCustomModule { + option (google.api.resource) = { + type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + pattern: "organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}" + pattern: "projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}" + pattern: "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}" + plural: "securityHealthAnalyticsCustomModules" + singular: "securityHealthAnalyticsCustomModule" + }; + + // Possible enablement states of a custom module. + enum EnablementState { + // Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // The module is enabled at the given organization, folder, or project. + ENABLED = 1; + + // The module is disabled at the given organization, folder, or project. + DISABLED = 2; + + // State is inherited from an ancestor module. The module will either + // be effectively `ENABLED` or `DISABLED` based on its closest non-inherited + // ancestor module in the resource hierarchy. If you try to set a top-level + // module (a module with no parent) to the `INHERITED` state, you receive an + // `INVALID_ARGUMENT` error. + INHERITED = 3; + } + + // Identifier. The full resource name of the custom module, in one of the + // following formats: + // + // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The display name of the Security Health Analytics custom module. + // This display name becomes the finding category for all findings that are + // returned by this custom module. The display name must be between 1 and 128 + // characters, start with a lowercase letter, and contain alphanumeric + // characters or underscores only. + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The enablement state of the custom module. + EnablementState enablement_state = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time at which the custom module was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The editor that last updated the custom module. + string last_editor = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Specifies the organization or folder from which the custom + // module is inherited. If empty, indicates that the custom module was created + // in the organization, folder, or project in which you are viewing the custom + // module. + string ancestor_module = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + ]; + + // Optional. The user-specified custom configuration for the module. + CustomConfig custom_config = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Defines the properties in a custom module configuration for Security +// Health Analytics. Use the custom module configuration to create custom +// detectors that generate custom findings for resources that you specify. +message CustomConfig { + // A set of optional name-value pairs that define custom source properties to + // return with each finding that is generated by the custom module. The custom + // source properties that are defined here are included in the finding. + message CustomOutputSpec { + // An individual name-value pair that defines a custom source property. + message Property { + // Optional. Name of the property for the custom output. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CEL expression for the custom output. A resource property + // can be specified to return the value of the property or a text string + // enclosed in quotation marks. + google.type.Expr value_expression = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. A list of custom output properties to add to the finding. + repeated Property properties = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Resource for selecting resource type. + message ResourceSelector { + // Optional. The resource types to run the detector on. + repeated string resource_types = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Defines the valid value options for the severity of a finding. + enum Severity { + // Default value. This value is unused. + SEVERITY_UNSPECIFIED = 0; + + // Critical severity. + CRITICAL = 1; + + // High severity. + HIGH = 2; + + // Medium severity. + MEDIUM = 3; + + // Low severity. + LOW = 4; + } + + // Optional. The Common Expression Language (CEL) expression to evaluate to + // produce findings. When the expression evaluates to `true` against a + // resource, a finding is generated. + google.type.Expr predicate = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom output properties. + CustomOutputSpec custom_output = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Asset Inventory resource types that the custom module + // operates on. For information about resource types, see [Supported asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). + // Each custom module can specify up to 5 resource types. + ResourceSelector resource_selector = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The severity to assign to findings generated by the module. + Severity severity = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text that describes the vulnerability or misconfiguration that + // the custom module detects. This explanation is returned with each finding + // instance to help investigators understand the detected issue. The text must + // be enclosed in quotation marks. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An explanation of the recommended steps that security teams can + // take to resolve the detected issue. This explanation is returned with each + // finding generated by this module. + string recommendation = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules]. +message ListSecurityHealthAnalyticsCustomModulesRequest { + // Required. Name of the parent organization, folder, or project in which to + // list custom modules, in one of the following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + ]; + + // Optional. The maximum number of results to return in a single response. + // Default is 10, minimum is 1, maximum is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules]. +message ListSecurityHealthAnalyticsCustomModulesResponse { + // The list of Security Health Analytics custom modules. + repeated SecurityHealthAnalyticsCustomModule + security_health_analytics_custom_modules = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// Request message for +// [SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules]. +message ListDescendantSecurityHealthAnalyticsCustomModulesRequest { + // Required. Name of the parent organization, folder, or project in which to + // list custom modules, in one of the following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + ]; + + // Optional. The maximum number of results to return in a single response. + // Default is 10, minimum is 1, maximum is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules]. +message ListDescendantSecurityHealthAnalyticsCustomModulesResponse { + // The list of SecurityHealthAnalyticsCustomModules + repeated SecurityHealthAnalyticsCustomModule + security_health_analytics_custom_modules = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// Request message for +// [SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule]. +message GetSecurityHealthAnalyticsCustomModuleRequest { + // Required. Name of the resource, in the format + // `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + ]; +} + +// Request message for +// [SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule]. +message CreateSecurityHealthAnalyticsCustomModuleRequest { + // Required. Name of the parent organization, folder, or project of the + // module, in one of the following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + ]; + + // Required. The resource being created. + SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = + 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be created. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to create the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule]. +message UpdateSecurityHealthAnalyticsCustomModuleRequest { + // Required. The fields to update. The following values are valid: + // + // * `custom_config` + // * `enablement_state` + // + // If you omit this field or set it to the wildcard value `*`, then all + // eligible fields are updated. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated. + SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = + 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be updated. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to update the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule]. +message DeleteSecurityHealthAnalyticsCustomModuleRequest { + // Required. The resource name of the SHA custom module, in one of the + // following formats: + // + // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + ]; + + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be deleted. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to delete the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during deletion of the module + // + // Defaults to `false`. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule]. +// The maximum size of the request is 4 MiB. +message SimulateSecurityHealthAnalyticsCustomModuleRequest { + // Manually constructed information about a resource. + message SimulatedResource { + // Required. The type of the resource. For example, + // `compute.googleapis.com/Disk`. + string resource_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A representation of the Google Cloud resource. Should match the + // Google Cloud resource JSON format. + // + // If the custom module evaluates only the IAM allow policy, then you can + // omit this field. + google.protobuf.Struct resource_data = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A representation of the IAM allow policy. + // + // If the custom module evaluates only the resource data, then you can omit + // this field. + google.iam.v1.Policy iam_policy_data = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The relative resource name of the organization, project, or + // folder. For more information about relative resource names, see [AIP-122: + // Resource names](https://google.aip.dev/122). Example: + // `organizations/{organization_id}`. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The custom configuration that you need to test. + CustomConfig custom_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Resource data to simulate custom module against. + SimulatedResource resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The minimum set of fields needed to represent a simulated finding from a +// Security Health Analytics custom module. +message SimulatedFinding { + option (google.api.resource) = { + type: "securitycenter.googleapis.com/Finding" + pattern: "organizations/{organization}/sources/{source}/findings/{finding}" + pattern: "folders/{folder}/sources/{source}/findings/{finding}" + pattern: "projects/{project}/sources/{source}/findings/{finding}" + plural: "findings" + singular: "finding" + }; + + // The state of the finding. + enum State { + // Default value. This value is unused. + STATE_UNSPECIFIED = 0; + + // The finding requires attention and has not been addressed yet. + ACTIVE = 1; + + // The finding has been fixed, triaged as a non-issue, or otherwise + // addressed and is no longer active. + INACTIVE = 2; + } + + // The severity of the finding. + enum Severity { + // Default value. This value is unused. + SEVERITY_UNSPECIFIED = 0; + + // For vulnerabilities: A critical vulnerability is easily discoverable by + // an external actor, exploitable, and results in the direct ability to + // execute arbitrary code, exfiltrate data, and otherwise gain additional + // access and privileges to cloud resources and workloads. Examples include + // publicly accessible unprotected user data and public SSH access with weak + // or no passwords. + // + // For threats: Indicates a threat that is able to access, modify, or delete + // data or execute unauthorized code within existing resources. + CRITICAL = 1; + + // For vulnerabilities: A high-risk vulnerability can be easily discovered + // and exploited in combination with other vulnerabilities in order to gain + // direct access and the ability to execute arbitrary code, exfiltrate data, + // and otherwise gain additional access and privileges to cloud resources + // and workloads. An example is a database with weak or no passwords that is + // only accessible internally. This database could easily be compromised by + // an actor that had access to the internal network. + // + // For threats: Indicates a threat that is able to create new computational + // resources in an environment but not able to access data or execute code + // in existing resources. + HIGH = 2; + + // For vulnerabilities: A medium-risk vulnerability could be used by an + // actor to gain access to resources or privileges that enable them to + // eventually (through multiple steps or a complex exploit) gain access and + // the ability to execute arbitrary code or exfiltrate data. An example is a + // service account with access to more projects than it should have. If an + // actor gains access to the service account, they could potentially use + // that access to manipulate a project the service account was not intended + // to. + // + // For threats: Indicates a threat that is able to cause operational impact + // but may not access data or execute unauthorized code. + MEDIUM = 3; + + // For vulnerabilities: A low-risk vulnerability hampers a security + // organization's ability to detect vulnerabilities or active threats in + // their deployment, or prevents the root cause investigation of security + // issues. An example is monitoring and logs being disabled for resource + // configurations and access. + // + // For threats: Indicates a threat that has obtained minimal access to an + // environment but is not able to access data, execute code, or create + // resources. + LOW = 4; + } + + // Represents what kind of finding it is. + enum FindingClass { + // Default value. This value is unused. + FINDING_CLASS_UNSPECIFIED = 0; + + // Describes unwanted or malicious activity. + THREAT = 1; + + // Describes a potential weakness in software that increases risk to + // confidentiality, integrity, and availability. + VULNERABILITY = 2; + + // Describes a potential weakness in cloud resource or asset configuration + // that increases risk. + MISCONFIGURATION = 3; + + // Describes a security observation that is for informational purposes. + OBSERVATION = 4; + + // Describes an error that prevents Security Command Center from working + // correctly. + SCC_ERROR = 5; + + // Describes a potential security risk due to a change in the security + // posture. + POSTURE_VIOLATION = 6; + + // Describes a combination of security issues that represent a more severe + // security problem when taken together. + TOXIC_COMBINATION = 7; + } + + // Identifier. The [relative resource name](https://google.aip.dev/122) of the + // finding, in one of the following formats: + // + // * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + // * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + // * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The [relative resource name](https://google.aip.dev/122) of the source the + // finding belongs to. For example, + // `organizations/{organization_id}/sources/{source_id}`. This field is + // immutable after creation time. + string parent = 2; + + // For findings on Google Cloud resources, the + // [full resource name](https://google.aip.dev/122#full-resource-names) of the + // Google Cloud resource this finding is for. When the finding is for a + // non-Google Cloud resource, the value can be a customer or partner defined + // string. This field is immutable after creation time. + string resource_name = 3; + + // The additional taxonomy group within findings from a given source. For + // example, `XSS_FLASH_INJECTION`. This field is immutable after creation + // time. + string category = 4; + + // Output only. The state of the finding. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Source-specific properties. These properties are managed by the source + // that writes the finding. The key names must be between 1 and 255 + // characters; they must start with a letter and contain alphanumeric + // characters or underscores only. + map source_properties = 6; + + // The time the finding was first detected. If an existing finding is updated, + // then this is the time the update occurred. If the finding is later + // resolved, then this time reflects when the finding was resolved. + // + // For example, if the finding represents an open firewall, this property + // captures the time the detector believes the firewall became open. The + // accuracy is determined by the detector. + // + // The event time must not be set to a value greater than the current + // timestamp. + google.protobuf.Timestamp event_time = 7; + + // The severity of the finding. This field is managed by the source that + // writes the finding. + Severity severity = 8; + + // The class of the finding. + FindingClass finding_class = 9; +} + +// Response message for +// [SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule]. +message SimulateSecurityHealthAnalyticsCustomModuleResponse { + // Possible test result. + message SimulatedResult { + // The result of the simulation. + oneof result { + // Finding that would be published for the test case if a violation is + // detected. + SimulatedFinding finding = 1; + + // Indicates that the test case does not trigger any violation. + google.protobuf.Empty no_violation = 2; + + // Error encountered during the test. + google.rpc.Status error = 3; + } + } + + // Result for test case in the corresponding request. + SimulatedResult result = 1; +} + +// The representation of an +// [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] +// at a given level, taking hierarchy into account and resolving various fields +// accordingly. For example, if the module is enabled at the ancestor level, +// then effective modules at all descendant levels will have their enablement +// state set to `ENABLED`. Similarly, if `module.inherited` is set, then the +// effective module's configuration will reflect the ancestor's configuration. +message EffectiveEventThreatDetectionCustomModule { + option (google.api.resource) = { + type: "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" + pattern: "organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}" + pattern: "projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}" + pattern: "folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}" + plural: "effectiveEventThreatDetectionCustomModules" + singular: "effectiveEventThreatDetectionCustomModule" + }; + + // The enablement state of the module. + enum EnablementState { + // Default value. This value is unused. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // The module is enabled at the given level. + ENABLED = 1; + + // The module is disabled at the given level. + DISABLED = 2; + } + + // Identifier. The resource name of the Event Threat Detection custom module, + // in one of the following formats: + // + // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Configuration for the effective module. + google.protobuf.Struct config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The effective state of enablement for the module at the given + // level of the hierarchy. + EnablementState enablement_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type for the module (for example, `CONFIGURABLE_BAD_IP`). + string type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The human-readable name of the module. + string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A description of the module. + string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules]. +message ListEffectiveEventThreatDetectionCustomModulesRequest { + // Required. Name of parent to list effective custom modules, in one of the + // following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + ]; + + // Optional. The maximum number of results to return in a single response. + // Default is 10, minimum is 1, maximum is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules]. +message ListEffectiveEventThreatDetectionCustomModulesResponse { + // The list of effective Event Threat Detection custom modules. + repeated EffectiveEventThreatDetectionCustomModule + effective_event_threat_detection_custom_modules = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// Request message for +// [SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule]. +message GetEffectiveEventThreatDetectionCustomModuleRequest { + // Required. The resource name of the Event Threat Detection custom module, in + // one of the following formats: + // + // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + ]; +} + +// A Security Command Center resource that contains the configuration and +// enablement state of a custom module, which enables Event Threat Detection to +// write certain findings to Security Command Center. +message EventThreatDetectionCustomModule { + option (google.api.resource) = { + type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + pattern: "organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}" + pattern: "projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}" + pattern: "folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}" + plural: "eventThreatDetectionCustomModules" + singular: "eventThreatDetectionCustomModule" + }; + + // The enablement state of the module. + enum EnablementState { + // Unspecified enablement state. + ENABLEMENT_STATE_UNSPECIFIED = 0; + + // The module is enabled at the given level. + ENABLED = 1; + + // The module is disabled at the given level. + DISABLED = 2; + + // State is inherited from an ancestor module. The module will either be + // effectively `ENABLED` or `DISABLED` based on its closest non-inherited + // ancestor module in the CRM hierarchy. If you try to set a top-level + // module (a module with no parent) to the `INHERITED` state, you receive an + // `INVALID_ARGUMENT` error. + INHERITED = 3; + } + + // Identifier. The resource name of the Event Threat Detection custom module, + // in one of the following formats: + // + // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Configuration for the module. For the resident module, its + // configuration value is defined at this level. For the inherited module, its + // configuration value is inherited from the ancestor module. + google.protobuf.Struct config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The closest ancestor module that this module inherits the + // enablement state from. If empty, indicates that the custom module was + // created in the requesting parent organization, folder, or project. The + // format is the same as the custom module's resource name. + string ancestor_module = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Optional. The state of enablement for the module at the given level of the + // hierarchy. + EnablementState enablement_state = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type for the module. For example, `CONFIGURABLE_BAD_IP`. + string type = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The human-readable name of the module. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A description of the module. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time the module was last updated. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The editor the module was last updated by. + string last_editor = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [SecurityCenterManagement.ListEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules]. +message ListEventThreatDetectionCustomModulesRequest { + // Required. Name of parent to list custom modules, in one of the following + // formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Optional. The maximum number of modules to return. The service may return + // fewer than this value. If unspecified, at most 10 modules will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SecurityCenterManagement.ListEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules]. +message ListEventThreatDetectionCustomModulesResponse { + // The list of custom modules. + repeated EventThreatDetectionCustomModule + event_threat_detection_custom_modules = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// Request message for +// [SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules]. +message ListDescendantEventThreatDetectionCustomModulesRequest { + // Required. Name of parent to list custom modules, in one of the following + // formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Optional. The maximum number of modules to return. The service may return + // fewer than this value. If unspecified, at most 10 configs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules]. +message ListDescendantEventThreatDetectionCustomModulesResponse { + // The list of custom modules. + repeated EventThreatDetectionCustomModule + event_threat_detection_custom_modules = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// Request message for +// [SecurityCenterManagement.GetEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule]. +message GetEventThreatDetectionCustomModuleRequest { + // Required. The resource name of the Event Threat Detection custom module, in + // one of the following formats: + // + // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + ]; +} + +// Request message for +// [SecurityCenterManagement.CreateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule]. +message CreateEventThreatDetectionCustomModuleRequest { + // Required. Name of parent for the module, in one of the following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Required. The module to create. The + // [EventThreatDetectionCustomModule.name][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name] + // field is ignored; Security Command Center generates the name. + EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be created. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to create the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for updating a EventThreatDetectionCustomModule +message UpdateEventThreatDetectionCustomModuleRequest { + // Required. The fields to update. If omitted, then all fields are updated. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The module being updated. + EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be updated. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to update the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [SecurityCenterManagement.DeleteEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule]. +message DeleteEventThreatDetectionCustomModuleRequest { + // Required. The resource name of the Event Threat Detection custom module, in + // one of the following formats: + // + // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be deleted. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to delete the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. + bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [SecurityCenterManagement.ValidateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule]. +message ValidateEventThreatDetectionCustomModuleRequest { + // Required. Resource name of the parent to validate the custom modules under, + // in one of the following formats: + // + // * `organizations/{organization}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + ]; + + // Required. The raw text of the module's contents. Used to generate error + // messages. + string raw_text = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. + string type = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [SecurityCenterManagement.ValidateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule]. +message ValidateEventThreatDetectionCustomModuleResponse { + // An error encountered while validating the uploaded configuration of an + // Event Threat Detection custom module. + message CustomModuleValidationError { + // A human-readable description of the error. + string description = 1; + + // The path, in [RFC 6901: JSON + // Pointer](https://datatracker.ietf.org/doc/html/rfc6901) format, to the + // field that failed validation. Omitted if no specific field is affected. + string field_path = 2; + + // The initial position of the error in the uploaded text version of the + // module. Omitted if no specific position applies, or if the position could + // not be computed. + optional Position start = 3; + + // The end position of the error in the uploaded text version of the module. + // Omitted if no specific position applies, or if the position could not be + // computed. + optional Position end = 4; + } + + // A position in the uploaded text version of a module. + message Position { + // The line position in the text. + int32 line_number = 1; + + // The column position in the line. + int32 column_number = 2; + } + + // A list of errors returned by the validator. If the list is empty, there + // were no errors. + repeated CustomModuleValidationError errors = 2; +} + +// Request message for +// [SecurityCenterManagement.GetSecurityCenterService][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService]. +message GetSecurityCenterServiceRequest { + // Required. The Security Command Center service to retrieve, in one of the + // following formats: + // + // * organizations/{organization}/locations/{location}/securityCenterServices/{service} + // * folders/{folder}/locations/{location}/securityCenterServices/{service} + // * projects/{project}/locations/{location}/securityCenterServices/{service} + // + // The following values are valid for `{service}`: + // + // * `container-threat-detection` + // * `event-threat-detection` + // * `security-health-analytics` + // * `vm-threat-detection` + // * `web-security-scanner` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "securitycentermanagement.googleapis.com/SecurityCenterService" + } + ]; + + // Set to `true` to show only modules that are in scope. By default, all + // modules are shown. + bool show_eligible_modules_only = 2; +} + +// Request message for +// [SecurityCenterManagement.ListSecurityCenterServices][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices]. +message ListSecurityCenterServicesRequest { + // Required. The name of the parent to list Security Command Center services, + // in one of the following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "securitycentermanagement.googleapis.com/SecurityCenterService" + } + ]; + + // Optional. The maximum number of results to return in a single response. + // Default is 10, minimum is 1, maximum is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Flag that, when set, is used to filter the module settings that are shown. + // The default setting is that all modules are shown. + bool show_eligible_modules_only = 4; +} + +// Response message for +// [SecurityCenterManagement.ListSecurityCenterServices][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices]. +message ListSecurityCenterServicesResponse { + // The list of services. + repeated SecurityCenterService security_center_services = 1; + + // A pagination token. To retrieve the next page of results, call the method + // again with this token. + string next_page_token = 2; +} + +// Request message for +// [SecurityCenterManagement.UpdateSecurityCenterService][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService]. +message UpdateSecurityCenterServiceRequest { + // Required. The updated service. + SecurityCenterService security_center_service = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields to update. Accepts the following values: + // + // * `intended_enablement_state` + // * `modules` + // + // If omitted, then all eligible fields are updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no service will be updated. An `OK` response indicates that + // the request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to update the service could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during update of the service + // + // Defaults to `false`. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts new file mode 100644 index 00000000000..a03ba381397 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts @@ -0,0 +1,13604 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 securitycentermanagement. */ + namespace securitycentermanagement { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a SecurityCenterManagement */ + class SecurityCenterManagement extends $protobuf.rpc.Service { + + /** + * Constructs a new SecurityCenterManagement 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 SecurityCenterManagement 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): SecurityCenterManagement; + + /** + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ + public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback): void; + + /** + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns Promise + */ + public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): Promise; + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule + */ + public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse + */ + public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModulesCallback): void; + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns Promise + */ + public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest): Promise; + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModulesCallback): void; + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns Promise + */ + public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): Promise; + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + */ + public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + */ + public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + */ + public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse + */ + public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModuleCallback): void; + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns Promise + */ + public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): Promise; + + /** + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @param request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEffectiveEventThreatDetectionCustomModulesResponse + */ + public listEffectiveEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModulesCallback): void; + + /** + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @param request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @returns Promise + */ + public listEffectiveEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest): Promise; + + /** + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @param request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EffectiveEventThreatDetectionCustomModule + */ + public getEffectiveEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModuleCallback): void; + + /** + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @param request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public getEffectiveEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest): Promise; + + /** + * Calls ListEventThreatDetectionCustomModules. + * @param request ListEventThreatDetectionCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEventThreatDetectionCustomModulesResponse + */ + public listEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModulesCallback): void; + + /** + * Calls ListEventThreatDetectionCustomModules. + * @param request ListEventThreatDetectionCustomModulesRequest message or plain object + * @returns Promise + */ + public listEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest): Promise; + + /** + * Calls ListDescendantEventThreatDetectionCustomModules. + * @param request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDescendantEventThreatDetectionCustomModulesResponse + */ + public listDescendantEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModulesCallback): void; + + /** + * Calls ListDescendantEventThreatDetectionCustomModules. + * @param request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @returns Promise + */ + public listDescendantEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest): Promise; + + /** + * Calls GetEventThreatDetectionCustomModule. + * @param request GetEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + */ + public getEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModuleCallback): void; + + /** + * Calls GetEventThreatDetectionCustomModule. + * @param request GetEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public getEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest): Promise; + + /** + * Calls CreateEventThreatDetectionCustomModule. + * @param request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + */ + public createEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModuleCallback): void; + + /** + * Calls CreateEventThreatDetectionCustomModule. + * @param request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public createEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest): Promise; + + /** + * Calls UpdateEventThreatDetectionCustomModule. + * @param request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + */ + public updateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModuleCallback): void; + + /** + * Calls UpdateEventThreatDetectionCustomModule. + * @param request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public updateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest): Promise; + + /** + * Calls DeleteEventThreatDetectionCustomModule. + * @param request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModuleCallback): void; + + /** + * Calls DeleteEventThreatDetectionCustomModule. + * @param request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public deleteEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest): Promise; + + /** + * Calls ValidateEventThreatDetectionCustomModule. + * @param request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ValidateEventThreatDetectionCustomModuleResponse + */ + public validateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModuleCallback): void; + + /** + * Calls ValidateEventThreatDetectionCustomModule. + * @param request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @returns Promise + */ + public validateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest): Promise; + + /** + * Calls GetSecurityCenterService. + * @param request GetSecurityCenterServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityCenterService + */ + public getSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterServiceCallback): void; + + /** + * Calls GetSecurityCenterService. + * @param request GetSecurityCenterServiceRequest message or plain object + * @returns Promise + */ + public getSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest): Promise; + + /** + * Calls ListSecurityCenterServices. + * @param request ListSecurityCenterServicesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSecurityCenterServicesResponse + */ + public listSecurityCenterServices(request: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServicesCallback): void; + + /** + * Calls ListSecurityCenterServices. + * @param request ListSecurityCenterServicesRequest message or plain object + * @returns Promise + */ + public listSecurityCenterServices(request: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest): Promise; + + /** + * Calls UpdateSecurityCenterService. + * @param request UpdateSecurityCenterServiceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SecurityCenterService + */ + public updateSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterServiceCallback): void; + + /** + * Calls UpdateSecurityCenterService. + * @param request UpdateSecurityCenterServiceRequest message or plain object + * @returns Promise + */ + public updateSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest): Promise; + } + + namespace SecurityCenterManagement { + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveSecurityHealthAnalyticsCustomModules}. + * @param error Error, if any + * @param [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ + type ListEffectiveSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] EffectiveSecurityHealthAnalyticsCustomModule + */ + type GetEffectiveSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityHealthAnalyticsCustomModules}. + * @param error Error, if any + * @param [response] ListSecurityHealthAnalyticsCustomModulesResponse + */ + type ListSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantSecurityHealthAnalyticsCustomModules}. + * @param error Error, if any + * @param [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + type ListDescendantSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SecurityHealthAnalyticsCustomModule + */ + type GetSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SecurityHealthAnalyticsCustomModule + */ + type CreateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SecurityHealthAnalyticsCustomModule + */ + type UpdateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|simulateSecurityHealthAnalyticsCustomModule}. + * @param error Error, if any + * @param [response] SimulateSecurityHealthAnalyticsCustomModuleResponse + */ + type SimulateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveEventThreatDetectionCustomModules}. + * @param error Error, if any + * @param [response] ListEffectiveEventThreatDetectionCustomModulesResponse + */ + type ListEffectiveEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EffectiveEventThreatDetectionCustomModule + */ + type GetEffectiveEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEventThreatDetectionCustomModules}. + * @param error Error, if any + * @param [response] ListEventThreatDetectionCustomModulesResponse + */ + type ListEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantEventThreatDetectionCustomModules}. + * @param error Error, if any + * @param [response] ListDescendantEventThreatDetectionCustomModulesResponse + */ + type ListDescendantEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EventThreatDetectionCustomModule + */ + type GetEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EventThreatDetectionCustomModule + */ + type CreateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] EventThreatDetectionCustomModule + */ + type UpdateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|validateEventThreatDetectionCustomModule}. + * @param error Error, if any + * @param [response] ValidateEventThreatDetectionCustomModuleResponse + */ + type ValidateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityCenterService}. + * @param error Error, if any + * @param [response] SecurityCenterService + */ + type GetSecurityCenterServiceCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityCenterService) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityCenterServices}. + * @param error Error, if any + * @param [response] ListSecurityCenterServicesResponse + */ + type ListSecurityCenterServicesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse) => void; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityCenterService}. + * @param error Error, if any + * @param [response] SecurityCenterService + */ + type UpdateSecurityCenterServiceCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityCenterService) => void; + } + + /** Properties of a SecurityCenterService. */ + interface ISecurityCenterService { + + /** SecurityCenterService name */ + name?: (string|null); + + /** SecurityCenterService intendedEnablementState */ + intendedEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); + + /** SecurityCenterService effectiveEnablementState */ + effectiveEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); + + /** SecurityCenterService modules */ + modules?: ({ [k: string]: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings }|null); + + /** SecurityCenterService updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** SecurityCenterService serviceConfig */ + serviceConfig?: (google.protobuf.IStruct|null); + } + + /** Represents a SecurityCenterService. */ + class SecurityCenterService implements ISecurityCenterService { + + /** + * Constructs a new SecurityCenterService. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ISecurityCenterService); + + /** SecurityCenterService name. */ + public name: string; + + /** SecurityCenterService intendedEnablementState. */ + public intendedEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); + + /** SecurityCenterService effectiveEnablementState. */ + public effectiveEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); + + /** SecurityCenterService modules. */ + public modules: { [k: string]: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings }; + + /** SecurityCenterService updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** SecurityCenterService serviceConfig. */ + public serviceConfig?: (google.protobuf.IStruct|null); + + /** + * Creates a new SecurityCenterService instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityCenterService instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ISecurityCenterService): google.cloud.securitycentermanagement.v1.SecurityCenterService; + + /** + * Encodes the specified SecurityCenterService message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. + * @param message SecurityCenterService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ISecurityCenterService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityCenterService message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. + * @param message SecurityCenterService message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISecurityCenterService, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityCenterService message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityCenterService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SecurityCenterService; + + /** + * Decodes a SecurityCenterService message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityCenterService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SecurityCenterService; + + /** + * Verifies a SecurityCenterService message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityCenterService message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityCenterService + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SecurityCenterService; + + /** + * Creates a plain object from a SecurityCenterService message. Also converts values to other types if specified. + * @param message SecurityCenterService + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SecurityCenterService, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityCenterService to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityCenterService + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityCenterService { + + /** Properties of a ModuleSettings. */ + interface IModuleSettings { + + /** ModuleSettings intendedEnablementState */ + intendedEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); + + /** ModuleSettings effectiveEnablementState */ + effectiveEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); + } + + /** Represents a ModuleSettings. */ + class ModuleSettings implements IModuleSettings { + + /** + * Constructs a new ModuleSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings); + + /** ModuleSettings intendedEnablementState. */ + public intendedEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); + + /** ModuleSettings effectiveEnablementState. */ + public effectiveEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); + + /** + * Creates a new ModuleSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ModuleSettings instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; + + /** + * Encodes the specified ModuleSettings message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. + * @param message ModuleSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModuleSettings message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. + * @param message ModuleSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModuleSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModuleSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; + + /** + * Decodes a ModuleSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModuleSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; + + /** + * Verifies a ModuleSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ModuleSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModuleSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; + + /** + * Creates a plain object from a ModuleSettings message. Also converts values to other types if specified. + * @param message ModuleSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModuleSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ModuleSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + INHERITED = 1, + ENABLED = 2, + DISABLED = 3, + INGEST_ONLY = 4 + } + } + + /** Properties of an EffectiveSecurityHealthAnalyticsCustomModule. */ + interface IEffectiveSecurityHealthAnalyticsCustomModule { + + /** EffectiveSecurityHealthAnalyticsCustomModule name */ + name?: (string|null); + + /** EffectiveSecurityHealthAnalyticsCustomModule customConfig */ + customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); + + /** EffectiveSecurityHealthAnalyticsCustomModule enablementState */ + enablementState?: (google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null); + + /** EffectiveSecurityHealthAnalyticsCustomModule displayName */ + displayName?: (string|null); + } + + /** Represents an EffectiveSecurityHealthAnalyticsCustomModule. */ + class EffectiveSecurityHealthAnalyticsCustomModule implements IEffectiveSecurityHealthAnalyticsCustomModule { + + /** + * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule); + + /** EffectiveSecurityHealthAnalyticsCustomModule name. */ + public name: string; + + /** EffectiveSecurityHealthAnalyticsCustomModule customConfig. */ + public customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); + + /** EffectiveSecurityHealthAnalyticsCustomModule enablementState. */ + public enablementState: (google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState); + + /** EffectiveSecurityHealthAnalyticsCustomModule displayName. */ + public displayName: string; + + /** + * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. + * @param [properties] Properties to set + * @returns EffectiveSecurityHealthAnalyticsCustomModule instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; + + /** + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EffectiveSecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; + + /** + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EffectiveSecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; + + /** + * Verifies an EffectiveSecurityHealthAnalyticsCustomModule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EffectiveSecurityHealthAnalyticsCustomModule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; + + /** + * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * @param message EffectiveSecurityHealthAnalyticsCustomModule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EffectiveSecurityHealthAnalyticsCustomModule { + + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + } + + /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ + interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent */ + parent?: (string|null); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ + class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { + + /** + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. */ + public parent: string; + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ + interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules */ + effectiveSecurityHealthAnalyticsCustomModules?: (google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]|null); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ + class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { + + /** + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse); + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. */ + public effectiveSecurityHealthAnalyticsCustomModules: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]; + + /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ + interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { + + /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name */ + name?: (string|null); + } + + /** Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ + class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { + + /** + * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest); + + /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. */ + public name: string; + + /** + * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecurityHealthAnalyticsCustomModule. */ + interface ISecurityHealthAnalyticsCustomModule { + + /** SecurityHealthAnalyticsCustomModule name */ + name?: (string|null); + + /** SecurityHealthAnalyticsCustomModule displayName */ + displayName?: (string|null); + + /** SecurityHealthAnalyticsCustomModule enablementState */ + enablementState?: (google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null); + + /** SecurityHealthAnalyticsCustomModule updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** SecurityHealthAnalyticsCustomModule lastEditor */ + lastEditor?: (string|null); + + /** SecurityHealthAnalyticsCustomModule ancestorModule */ + ancestorModule?: (string|null); + + /** SecurityHealthAnalyticsCustomModule customConfig */ + customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); + } + + /** Represents a SecurityHealthAnalyticsCustomModule. */ + class SecurityHealthAnalyticsCustomModule implements ISecurityHealthAnalyticsCustomModule { + + /** + * Constructs a new SecurityHealthAnalyticsCustomModule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule); + + /** SecurityHealthAnalyticsCustomModule name. */ + public name: string; + + /** SecurityHealthAnalyticsCustomModule displayName. */ + public displayName: string; + + /** SecurityHealthAnalyticsCustomModule enablementState. */ + public enablementState: (google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState); + + /** SecurityHealthAnalyticsCustomModule updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** SecurityHealthAnalyticsCustomModule lastEditor. */ + public lastEditor: string; + + /** SecurityHealthAnalyticsCustomModule ancestorModule. */ + public ancestorModule: string; + + /** SecurityHealthAnalyticsCustomModule customConfig. */ + public customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); + + /** + * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityHealthAnalyticsCustomModule instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Verifies a SecurityHealthAnalyticsCustomModule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityHealthAnalyticsCustomModule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; + + /** + * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * @param message SecurityHealthAnalyticsCustomModule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityHealthAnalyticsCustomModule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityHealthAnalyticsCustomModule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityHealthAnalyticsCustomModule { + + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2, + INHERITED = 3 + } + } + + /** Properties of a CustomConfig. */ + interface ICustomConfig { + + /** CustomConfig predicate */ + predicate?: (google.type.IExpr|null); + + /** CustomConfig customOutput */ + customOutput?: (google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null); + + /** CustomConfig resourceSelector */ + resourceSelector?: (google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null); + + /** CustomConfig severity */ + severity?: (google.cloud.securitycentermanagement.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycentermanagement.v1.CustomConfig.Severity|null); + + /** CustomConfig description */ + description?: (string|null); + + /** CustomConfig recommendation */ + recommendation?: (string|null); + } + + /** Represents a CustomConfig. */ + class CustomConfig implements ICustomConfig { + + /** + * Constructs a new CustomConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ICustomConfig); + + /** CustomConfig predicate. */ + public predicate?: (google.type.IExpr|null); + + /** CustomConfig customOutput. */ + public customOutput?: (google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null); + + /** CustomConfig resourceSelector. */ + public resourceSelector?: (google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null); + + /** CustomConfig severity. */ + public severity: (google.cloud.securitycentermanagement.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycentermanagement.v1.CustomConfig.Severity); + + /** CustomConfig description. */ + public description: string; + + /** CustomConfig recommendation. */ + public recommendation: string; + + /** + * Creates a new CustomConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomConfig instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ICustomConfig): google.cloud.securitycentermanagement.v1.CustomConfig; + + /** + * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. + * @param message CustomConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. + * @param message CustomConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig; + + /** + * Decodes a CustomConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig; + + /** + * Verifies a CustomConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig; + + /** + * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. + * @param message CustomConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomConfig { + + /** Properties of a CustomOutputSpec. */ + interface ICustomOutputSpec { + + /** CustomOutputSpec properties */ + properties?: (google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty[]|null); + } + + /** Represents a CustomOutputSpec. */ + class CustomOutputSpec implements ICustomOutputSpec { + + /** + * Constructs a new CustomOutputSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec); + + /** CustomOutputSpec properties. */ + public properties: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty[]; + + /** + * Creates a new CustomOutputSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomOutputSpec instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; + + /** + * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @param message CustomOutputSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @param message CustomOutputSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomOutputSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomOutputSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; + + /** + * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomOutputSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; + + /** + * Verifies a CustomOutputSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomOutputSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; + + /** + * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. + * @param message CustomOutputSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomOutputSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomOutputSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomOutputSpec { + + /** Properties of a Property. */ + interface IProperty { + + /** Property name */ + name?: (string|null); + + /** Property valueExpression */ + valueExpression?: (google.type.IExpr|null); + } + + /** Represents a Property. */ + class Property implements IProperty { + + /** + * Constructs a new Property. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty); + + /** Property name. */ + public name: string; + + /** Property valueExpression. */ + public valueExpression?: (google.type.IExpr|null); + + /** + * Creates a new Property instance using the specified properties. + * @param [properties] Properties to set + * @returns Property instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Property message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; + + /** + * Verifies a Property message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Property + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @param message Property + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Property to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Property + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ResourceSelector. */ + interface IResourceSelector { + + /** ResourceSelector resourceTypes */ + resourceTypes?: (string[]|null); + } + + /** Represents a ResourceSelector. */ + class ResourceSelector implements IResourceSelector { + + /** + * Constructs a new ResourceSelector. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector); + + /** ResourceSelector resourceTypes. */ + public resourceTypes: string[]; + + /** + * Creates a new ResourceSelector instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceSelector instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; + + /** + * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @param message ResourceSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @param message ResourceSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceSelector message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; + + /** + * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; + + /** + * Verifies a ResourceSelector message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceSelector message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceSelector + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; + + /** + * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. + * @param message ResourceSelector + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceSelector to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + CRITICAL = 1, + HIGH = 2, + MEDIUM = 3, + LOW = 4 + } + } + + /** Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. */ + interface IListSecurityHealthAnalyticsCustomModulesRequest { + + /** ListSecurityHealthAnalyticsCustomModulesRequest parent */ + parent?: (string|null); + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListSecurityHealthAnalyticsCustomModulesRequest. */ + class ListSecurityHealthAnalyticsCustomModulesRequest implements IListSecurityHealthAnalyticsCustomModulesRequest { + + /** + * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest); + + /** ListSecurityHealthAnalyticsCustomModulesRequest parent. */ + public parent: string; + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecurityHealthAnalyticsCustomModulesRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecurityHealthAnalyticsCustomModulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListSecurityHealthAnalyticsCustomModulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. */ + interface IListSecurityHealthAnalyticsCustomModulesResponse { + + /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ + securityHealthAnalyticsCustomModules?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null); + + /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSecurityHealthAnalyticsCustomModulesResponse. */ + class ListSecurityHealthAnalyticsCustomModulesResponse implements IListSecurityHealthAnalyticsCustomModulesResponse { + + /** + * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse); + + /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ + public securityHealthAnalyticsCustomModules: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]; + + /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecurityHealthAnalyticsCustomModulesResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecurityHealthAnalyticsCustomModulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListSecurityHealthAnalyticsCustomModulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ + interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest { + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent */ + parent?: (string|null); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ + class ListDescendantSecurityHealthAnalyticsCustomModulesRequest implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest { + + /** + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. */ + public parent: string; + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + + /** + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ + interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse { + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ + securityHealthAnalyticsCustomModules?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ + class ListDescendantSecurityHealthAnalyticsCustomModulesResponse implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse { + + /** + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse); + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ + public securityHealthAnalyticsCustomModules: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]; + + /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + + /** + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. */ + interface IGetSecurityHealthAnalyticsCustomModuleRequest { + + /** GetSecurityHealthAnalyticsCustomModuleRequest name */ + name?: (string|null); + } + + /** Represents a GetSecurityHealthAnalyticsCustomModuleRequest. */ + class GetSecurityHealthAnalyticsCustomModuleRequest implements IGetSecurityHealthAnalyticsCustomModuleRequest { + + /** + * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest); + + /** GetSecurityHealthAnalyticsCustomModuleRequest name. */ + public name: string; + + /** + * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSecurityHealthAnalyticsCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSecurityHealthAnalyticsCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. */ + interface ICreateSecurityHealthAnalyticsCustomModuleRequest { + + /** CreateSecurityHealthAnalyticsCustomModuleRequest parent */ + parent?: (string|null); + + /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ + securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); + + /** CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. */ + class CreateSecurityHealthAnalyticsCustomModuleRequest implements ICreateSecurityHealthAnalyticsCustomModuleRequest { + + /** + * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest); + + /** CreateSecurityHealthAnalyticsCustomModuleRequest parent. */ + public parent: string; + + /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ + public securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); + + /** CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSecurityHealthAnalyticsCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message CreateSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ + interface IUpdateSecurityHealthAnalyticsCustomModuleRequest { + + /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ + securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); + + /** UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ + class UpdateSecurityHealthAnalyticsCustomModuleRequest implements IUpdateSecurityHealthAnalyticsCustomModuleRequest { + + /** + * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest); + + /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ + public securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); + + /** UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ + interface IDeleteSecurityHealthAnalyticsCustomModuleRequest { + + /** DeleteSecurityHealthAnalyticsCustomModuleRequest name */ + name?: (string|null); + + /** DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ + class DeleteSecurityHealthAnalyticsCustomModuleRequest implements IDeleteSecurityHealthAnalyticsCustomModuleRequest { + + /** + * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest); + + /** DeleteSecurityHealthAnalyticsCustomModuleRequest name. */ + public name: string; + + /** DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ + interface ISimulateSecurityHealthAnalyticsCustomModuleRequest { + + /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent */ + parent?: (string|null); + + /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig */ + customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); + + /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource */ + resource?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); + } + + /** Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ + class SimulateSecurityHealthAnalyticsCustomModuleRequest implements ISimulateSecurityHealthAnalyticsCustomModuleRequest { + + /** + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest); + + /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent. */ + public parent: string; + + /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. */ + public customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); + + /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource. */ + public resource?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); + + /** + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; + + /** + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SimulateSecurityHealthAnalyticsCustomModuleRequest { + + /** Properties of a SimulatedResource. */ + interface ISimulatedResource { + + /** SimulatedResource resourceType */ + resourceType?: (string|null); + + /** SimulatedResource resourceData */ + resourceData?: (google.protobuf.IStruct|null); + + /** SimulatedResource iamPolicyData */ + iamPolicyData?: (google.iam.v1.IPolicy|null); + } + + /** Represents a SimulatedResource. */ + class SimulatedResource implements ISimulatedResource { + + /** + * Constructs a new SimulatedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource); + + /** SimulatedResource resourceType. */ + public resourceType: string; + + /** SimulatedResource resourceData. */ + public resourceData?: (google.protobuf.IStruct|null); + + /** SimulatedResource iamPolicyData. */ + public iamPolicyData?: (google.iam.v1.IPolicy|null); + + /** + * Creates a new SimulatedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulatedResource instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; + + /** + * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @param message SimulatedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @param message SimulatedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulatedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimulatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; + + /** + * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimulatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; + + /** + * Verifies a SimulatedResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimulatedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulatedResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; + + /** + * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. + * @param message SimulatedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimulatedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimulatedResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SimulatedFinding. */ + interface ISimulatedFinding { + + /** SimulatedFinding name */ + name?: (string|null); + + /** SimulatedFinding parent */ + parent?: (string|null); + + /** SimulatedFinding resourceName */ + resourceName?: (string|null); + + /** SimulatedFinding category */ + category?: (string|null); + + /** SimulatedFinding state */ + state?: (google.cloud.securitycentermanagement.v1.SimulatedFinding.State|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.State|null); + + /** SimulatedFinding sourceProperties */ + sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); + + /** SimulatedFinding eventTime */ + eventTime?: (google.protobuf.ITimestamp|null); + + /** SimulatedFinding severity */ + severity?: (google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|null); + + /** SimulatedFinding findingClass */ + findingClass?: (google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|null); + } + + /** Represents a SimulatedFinding. */ + class SimulatedFinding implements ISimulatedFinding { + + /** + * Constructs a new SimulatedFinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ISimulatedFinding); + + /** SimulatedFinding name. */ + public name: string; + + /** SimulatedFinding parent. */ + public parent: string; + + /** SimulatedFinding resourceName. */ + public resourceName: string; + + /** SimulatedFinding category. */ + public category: string; + + /** SimulatedFinding state. */ + public state: (google.cloud.securitycentermanagement.v1.SimulatedFinding.State|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.State); + + /** SimulatedFinding sourceProperties. */ + public sourceProperties: { [k: string]: google.protobuf.IValue }; + + /** SimulatedFinding eventTime. */ + public eventTime?: (google.protobuf.ITimestamp|null); + + /** SimulatedFinding severity. */ + public severity: (google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity); + + /** SimulatedFinding findingClass. */ + public findingClass: (google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass); + + /** + * Creates a new SimulatedFinding instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulatedFinding instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ISimulatedFinding): google.cloud.securitycentermanagement.v1.SimulatedFinding; + + /** + * Encodes the specified SimulatedFinding message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. + * @param message SimulatedFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ISimulatedFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulatedFinding message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. + * @param message SimulatedFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISimulatedFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulatedFinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimulatedFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulatedFinding; + + /** + * Decodes a SimulatedFinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimulatedFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulatedFinding; + + /** + * Verifies a SimulatedFinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimulatedFinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulatedFinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulatedFinding; + + /** + * Creates a plain object from a SimulatedFinding message. Also converts values to other types if specified. + * @param message SimulatedFinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SimulatedFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimulatedFinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimulatedFinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SimulatedFinding { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + INACTIVE = 2 + } + + /** Severity enum. */ + enum Severity { + SEVERITY_UNSPECIFIED = 0, + CRITICAL = 1, + HIGH = 2, + MEDIUM = 3, + LOW = 4 + } + + /** FindingClass enum. */ + enum FindingClass { + FINDING_CLASS_UNSPECIFIED = 0, + THREAT = 1, + VULNERABILITY = 2, + MISCONFIGURATION = 3, + OBSERVATION = 4, + SCC_ERROR = 5, + POSTURE_VIOLATION = 6, + TOXIC_COMBINATION = 7 + } + } + + /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ + interface ISimulateSecurityHealthAnalyticsCustomModuleResponse { + + /** SimulateSecurityHealthAnalyticsCustomModuleResponse result */ + result?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); + } + + /** Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ + class SimulateSecurityHealthAnalyticsCustomModuleResponse implements ISimulateSecurityHealthAnalyticsCustomModuleResponse { + + /** + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse); + + /** SimulateSecurityHealthAnalyticsCustomModuleResponse result. */ + public result?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); + + /** + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + + /** + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; + + /** + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. + * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SimulateSecurityHealthAnalyticsCustomModuleResponse { + + /** Properties of a SimulatedResult. */ + interface ISimulatedResult { + + /** SimulatedResult finding */ + finding?: (google.cloud.securitycentermanagement.v1.ISimulatedFinding|null); + + /** SimulatedResult noViolation */ + noViolation?: (google.protobuf.IEmpty|null); + + /** SimulatedResult error */ + error?: (google.rpc.IStatus|null); + } + + /** Represents a SimulatedResult. */ + class SimulatedResult implements ISimulatedResult { + + /** + * Constructs a new SimulatedResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult); + + /** SimulatedResult finding. */ + public finding?: (google.cloud.securitycentermanagement.v1.ISimulatedFinding|null); + + /** SimulatedResult noViolation. */ + public noViolation?: (google.protobuf.IEmpty|null); + + /** SimulatedResult error. */ + public error?: (google.rpc.IStatus|null); + + /** SimulatedResult result. */ + public result?: ("finding"|"noViolation"|"error"); + + /** + * Creates a new SimulatedResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SimulatedResult instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + + /** + * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @param message SimulatedResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @param message SimulatedResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulatedResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SimulatedResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + + /** + * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SimulatedResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + + /** + * Verifies a SimulatedResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimulatedResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulatedResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; + + /** + * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. + * @param message SimulatedResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimulatedResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SimulatedResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EffectiveEventThreatDetectionCustomModule. */ + interface IEffectiveEventThreatDetectionCustomModule { + + /** EffectiveEventThreatDetectionCustomModule name */ + name?: (string|null); + + /** EffectiveEventThreatDetectionCustomModule config */ + config?: (google.protobuf.IStruct|null); + + /** EffectiveEventThreatDetectionCustomModule enablementState */ + enablementState?: (google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|null); + + /** EffectiveEventThreatDetectionCustomModule type */ + type?: (string|null); + + /** EffectiveEventThreatDetectionCustomModule displayName */ + displayName?: (string|null); + + /** EffectiveEventThreatDetectionCustomModule description */ + description?: (string|null); + } + + /** Represents an EffectiveEventThreatDetectionCustomModule. */ + class EffectiveEventThreatDetectionCustomModule implements IEffectiveEventThreatDetectionCustomModule { + + /** + * Constructs a new EffectiveEventThreatDetectionCustomModule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule); + + /** EffectiveEventThreatDetectionCustomModule name. */ + public name: string; + + /** EffectiveEventThreatDetectionCustomModule config. */ + public config?: (google.protobuf.IStruct|null); + + /** EffectiveEventThreatDetectionCustomModule enablementState. */ + public enablementState: (google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState); + + /** EffectiveEventThreatDetectionCustomModule type. */ + public type: string; + + /** EffectiveEventThreatDetectionCustomModule displayName. */ + public displayName: string; + + /** EffectiveEventThreatDetectionCustomModule description. */ + public description: string; + + /** + * Creates a new EffectiveEventThreatDetectionCustomModule instance using the specified properties. + * @param [properties] Properties to set + * @returns EffectiveEventThreatDetectionCustomModule instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; + + /** + * Encodes the specified EffectiveEventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. + * @param message EffectiveEventThreatDetectionCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EffectiveEventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. + * @param message EffectiveEventThreatDetectionCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EffectiveEventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; + + /** + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EffectiveEventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; + + /** + * Verifies an EffectiveEventThreatDetectionCustomModule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EffectiveEventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EffectiveEventThreatDetectionCustomModule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; + + /** + * Creates a plain object from an EffectiveEventThreatDetectionCustomModule message. Also converts values to other types if specified. + * @param message EffectiveEventThreatDetectionCustomModule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EffectiveEventThreatDetectionCustomModule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EffectiveEventThreatDetectionCustomModule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EffectiveEventThreatDetectionCustomModule { + + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + } + + /** Properties of a ListEffectiveEventThreatDetectionCustomModulesRequest. */ + interface IListEffectiveEventThreatDetectionCustomModulesRequest { + + /** ListEffectiveEventThreatDetectionCustomModulesRequest parent */ + parent?: (string|null); + + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEffectiveEventThreatDetectionCustomModulesRequest. */ + class ListEffectiveEventThreatDetectionCustomModulesRequest implements IListEffectiveEventThreatDetectionCustomModulesRequest { + + /** + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest); + + /** ListEffectiveEventThreatDetectionCustomModulesRequest parent. */ + public parent: string; + + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListEffectiveEventThreatDetectionCustomModulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEffectiveEventThreatDetectionCustomModulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; + + /** + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; + + /** + * Verifies a ListEffectiveEventThreatDetectionCustomModulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEffectiveEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEffectiveEventThreatDetectionCustomModulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; + + /** + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListEffectiveEventThreatDetectionCustomModulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEffectiveEventThreatDetectionCustomModulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEffectiveEventThreatDetectionCustomModulesResponse. */ + interface IListEffectiveEventThreatDetectionCustomModulesResponse { + + /** ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules */ + effectiveEventThreatDetectionCustomModules?: (google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[]|null); + + /** ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEffectiveEventThreatDetectionCustomModulesResponse. */ + class ListEffectiveEventThreatDetectionCustomModulesResponse implements IListEffectiveEventThreatDetectionCustomModulesResponse { + + /** + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse); + + /** ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules. */ + public effectiveEventThreatDetectionCustomModules: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[]; + + /** ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEffectiveEventThreatDetectionCustomModulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; + + /** + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; + + /** + * Verifies a ListEffectiveEventThreatDetectionCustomModulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEffectiveEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEffectiveEventThreatDetectionCustomModulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; + + /** + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListEffectiveEventThreatDetectionCustomModulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEffectiveEventThreatDetectionCustomModulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEffectiveEventThreatDetectionCustomModuleRequest. */ + interface IGetEffectiveEventThreatDetectionCustomModuleRequest { + + /** GetEffectiveEventThreatDetectionCustomModuleRequest name */ + name?: (string|null); + } + + /** Represents a GetEffectiveEventThreatDetectionCustomModuleRequest. */ + class GetEffectiveEventThreatDetectionCustomModuleRequest implements IGetEffectiveEventThreatDetectionCustomModuleRequest { + + /** + * Constructs a new GetEffectiveEventThreatDetectionCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest); + + /** GetEffectiveEventThreatDetectionCustomModuleRequest name. */ + public name: string; + + /** + * Creates a new GetEffectiveEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; + + /** + * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; + + /** + * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; + + /** + * Verifies a GetEffectiveEventThreatDetectionCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEffectiveEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEffectiveEventThreatDetectionCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; + + /** + * Creates a plain object from a GetEffectiveEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetEffectiveEventThreatDetectionCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEffectiveEventThreatDetectionCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEffectiveEventThreatDetectionCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventThreatDetectionCustomModule. */ + interface IEventThreatDetectionCustomModule { + + /** EventThreatDetectionCustomModule name */ + name?: (string|null); + + /** EventThreatDetectionCustomModule config */ + config?: (google.protobuf.IStruct|null); + + /** EventThreatDetectionCustomModule ancestorModule */ + ancestorModule?: (string|null); + + /** EventThreatDetectionCustomModule enablementState */ + enablementState?: (google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|null); + + /** EventThreatDetectionCustomModule type */ + type?: (string|null); + + /** EventThreatDetectionCustomModule displayName */ + displayName?: (string|null); + + /** EventThreatDetectionCustomModule description */ + description?: (string|null); + + /** EventThreatDetectionCustomModule updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** EventThreatDetectionCustomModule lastEditor */ + lastEditor?: (string|null); + } + + /** Represents an EventThreatDetectionCustomModule. */ + class EventThreatDetectionCustomModule implements IEventThreatDetectionCustomModule { + + /** + * Constructs a new EventThreatDetectionCustomModule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule); + + /** EventThreatDetectionCustomModule name. */ + public name: string; + + /** EventThreatDetectionCustomModule config. */ + public config?: (google.protobuf.IStruct|null); + + /** EventThreatDetectionCustomModule ancestorModule. */ + public ancestorModule: string; + + /** EventThreatDetectionCustomModule enablementState. */ + public enablementState: (google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState); + + /** EventThreatDetectionCustomModule type. */ + public type: string; + + /** EventThreatDetectionCustomModule displayName. */ + public displayName: string; + + /** EventThreatDetectionCustomModule description. */ + public description: string; + + /** EventThreatDetectionCustomModule updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** EventThreatDetectionCustomModule lastEditor. */ + public lastEditor: string; + + /** + * Creates a new EventThreatDetectionCustomModule instance using the specified properties. + * @param [properties] Properties to set + * @returns EventThreatDetectionCustomModule instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; + + /** + * Encodes the specified EventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. + * @param message EventThreatDetectionCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. + * @param message EventThreatDetectionCustomModule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; + + /** + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; + + /** + * Verifies an EventThreatDetectionCustomModule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventThreatDetectionCustomModule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; + + /** + * Creates a plain object from an EventThreatDetectionCustomModule message. Also converts values to other types if specified. + * @param message EventThreatDetectionCustomModule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventThreatDetectionCustomModule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventThreatDetectionCustomModule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EventThreatDetectionCustomModule { + + /** EnablementState enum. */ + enum EnablementState { + ENABLEMENT_STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2, + INHERITED = 3 + } + } + + /** Properties of a ListEventThreatDetectionCustomModulesRequest. */ + interface IListEventThreatDetectionCustomModulesRequest { + + /** ListEventThreatDetectionCustomModulesRequest parent */ + parent?: (string|null); + + /** ListEventThreatDetectionCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListEventThreatDetectionCustomModulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEventThreatDetectionCustomModulesRequest. */ + class ListEventThreatDetectionCustomModulesRequest implements IListEventThreatDetectionCustomModulesRequest { + + /** + * Constructs a new ListEventThreatDetectionCustomModulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest); + + /** ListEventThreatDetectionCustomModulesRequest parent. */ + public parent: string; + + /** ListEventThreatDetectionCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListEventThreatDetectionCustomModulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEventThreatDetectionCustomModulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEventThreatDetectionCustomModulesRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; + + /** + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; + + /** + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; + + /** + * Verifies a ListEventThreatDetectionCustomModulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEventThreatDetectionCustomModulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; + + /** + * Creates a plain object from a ListEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListEventThreatDetectionCustomModulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEventThreatDetectionCustomModulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEventThreatDetectionCustomModulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEventThreatDetectionCustomModulesResponse. */ + interface IListEventThreatDetectionCustomModulesResponse { + + /** ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules */ + eventThreatDetectionCustomModules?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null); + + /** ListEventThreatDetectionCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEventThreatDetectionCustomModulesResponse. */ + class ListEventThreatDetectionCustomModulesResponse implements IListEventThreatDetectionCustomModulesResponse { + + /** + * Constructs a new ListEventThreatDetectionCustomModulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse); + + /** ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. */ + public eventThreatDetectionCustomModules: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]; + + /** ListEventThreatDetectionCustomModulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEventThreatDetectionCustomModulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEventThreatDetectionCustomModulesResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; + + /** + * Encodes the specified ListEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; + + /** + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; + + /** + * Verifies a ListEventThreatDetectionCustomModulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEventThreatDetectionCustomModulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; + + /** + * Creates a plain object from a ListEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListEventThreatDetectionCustomModulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEventThreatDetectionCustomModulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEventThreatDetectionCustomModulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDescendantEventThreatDetectionCustomModulesRequest. */ + interface IListDescendantEventThreatDetectionCustomModulesRequest { + + /** ListDescendantEventThreatDetectionCustomModulesRequest parent */ + parent?: (string|null); + + /** ListDescendantEventThreatDetectionCustomModulesRequest pageSize */ + pageSize?: (number|null); + + /** ListDescendantEventThreatDetectionCustomModulesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDescendantEventThreatDetectionCustomModulesRequest. */ + class ListDescendantEventThreatDetectionCustomModulesRequest implements IListDescendantEventThreatDetectionCustomModulesRequest { + + /** + * Constructs a new ListDescendantEventThreatDetectionCustomModulesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest); + + /** ListDescendantEventThreatDetectionCustomModulesRequest parent. */ + public parent: string; + + /** ListDescendantEventThreatDetectionCustomModulesRequest pageSize. */ + public pageSize: number; + + /** ListDescendantEventThreatDetectionCustomModulesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDescendantEventThreatDetectionCustomModulesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDescendantEventThreatDetectionCustomModulesRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; + + /** + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDescendantEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDescendantEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; + + /** + * Verifies a ListDescendantEventThreatDetectionCustomModulesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDescendantEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDescendantEventThreatDetectionCustomModulesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; + + /** + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @param message ListDescendantEventThreatDetectionCustomModulesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDescendantEventThreatDetectionCustomModulesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDescendantEventThreatDetectionCustomModulesResponse. */ + interface IListDescendantEventThreatDetectionCustomModulesResponse { + + /** ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules */ + eventThreatDetectionCustomModules?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null); + + /** ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDescendantEventThreatDetectionCustomModulesResponse. */ + class ListDescendantEventThreatDetectionCustomModulesResponse implements IListDescendantEventThreatDetectionCustomModulesResponse { + + /** + * Constructs a new ListDescendantEventThreatDetectionCustomModulesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse); + + /** ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. */ + public eventThreatDetectionCustomModules: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]; + + /** ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDescendantEventThreatDetectionCustomModulesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDescendantEventThreatDetectionCustomModulesResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; + + /** + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @param message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDescendantEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDescendantEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; + + /** + * Verifies a ListDescendantEventThreatDetectionCustomModulesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDescendantEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDescendantEventThreatDetectionCustomModulesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; + + /** + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @param message ListDescendantEventThreatDetectionCustomModulesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDescendantEventThreatDetectionCustomModulesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEventThreatDetectionCustomModuleRequest. */ + interface IGetEventThreatDetectionCustomModuleRequest { + + /** GetEventThreatDetectionCustomModuleRequest name */ + name?: (string|null); + } + + /** Represents a GetEventThreatDetectionCustomModuleRequest. */ + class GetEventThreatDetectionCustomModuleRequest implements IGetEventThreatDetectionCustomModuleRequest { + + /** + * Constructs a new GetEventThreatDetectionCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest); + + /** GetEventThreatDetectionCustomModuleRequest name. */ + public name: string; + + /** + * Creates a new GetEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEventThreatDetectionCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; + + /** + * Encodes the specified GetEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message GetEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; + + /** + * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; + + /** + * Verifies a GetEventThreatDetectionCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEventThreatDetectionCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; + + /** + * Creates a plain object from a GetEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message GetEventThreatDetectionCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEventThreatDetectionCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEventThreatDetectionCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateEventThreatDetectionCustomModuleRequest. */ + interface ICreateEventThreatDetectionCustomModuleRequest { + + /** CreateEventThreatDetectionCustomModuleRequest parent */ + parent?: (string|null); + + /** CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule */ + eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); + + /** CreateEventThreatDetectionCustomModuleRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateEventThreatDetectionCustomModuleRequest. */ + class CreateEventThreatDetectionCustomModuleRequest implements ICreateEventThreatDetectionCustomModuleRequest { + + /** + * Constructs a new CreateEventThreatDetectionCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest); + + /** CreateEventThreatDetectionCustomModuleRequest parent. */ + public parent: string; + + /** CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. */ + public eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); + + /** CreateEventThreatDetectionCustomModuleRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEventThreatDetectionCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; + + /** + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; + + /** + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; + + /** + * Verifies a CreateEventThreatDetectionCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEventThreatDetectionCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; + + /** + * Creates a plain object from a CreateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message CreateEventThreatDetectionCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEventThreatDetectionCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEventThreatDetectionCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEventThreatDetectionCustomModuleRequest. */ + interface IUpdateEventThreatDetectionCustomModuleRequest { + + /** UpdateEventThreatDetectionCustomModuleRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule */ + eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); + + /** UpdateEventThreatDetectionCustomModuleRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateEventThreatDetectionCustomModuleRequest. */ + class UpdateEventThreatDetectionCustomModuleRequest implements IUpdateEventThreatDetectionCustomModuleRequest { + + /** + * Constructs a new UpdateEventThreatDetectionCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest); + + /** UpdateEventThreatDetectionCustomModuleRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. */ + public eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); + + /** UpdateEventThreatDetectionCustomModuleRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEventThreatDetectionCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; + + /** + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; + + /** + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; + + /** + * Verifies an UpdateEventThreatDetectionCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEventThreatDetectionCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; + + /** + * Creates a plain object from an UpdateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message UpdateEventThreatDetectionCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEventThreatDetectionCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEventThreatDetectionCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEventThreatDetectionCustomModuleRequest. */ + interface IDeleteEventThreatDetectionCustomModuleRequest { + + /** DeleteEventThreatDetectionCustomModuleRequest name */ + name?: (string|null); + + /** DeleteEventThreatDetectionCustomModuleRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a DeleteEventThreatDetectionCustomModuleRequest. */ + class DeleteEventThreatDetectionCustomModuleRequest implements IDeleteEventThreatDetectionCustomModuleRequest { + + /** + * Constructs a new DeleteEventThreatDetectionCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest); + + /** DeleteEventThreatDetectionCustomModuleRequest name. */ + public name: string; + + /** DeleteEventThreatDetectionCustomModuleRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new DeleteEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEventThreatDetectionCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; + + /** + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; + + /** + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; + + /** + * Verifies a DeleteEventThreatDetectionCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEventThreatDetectionCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; + + /** + * Creates a plain object from a DeleteEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message DeleteEventThreatDetectionCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEventThreatDetectionCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEventThreatDetectionCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ValidateEventThreatDetectionCustomModuleRequest. */ + interface IValidateEventThreatDetectionCustomModuleRequest { + + /** ValidateEventThreatDetectionCustomModuleRequest parent */ + parent?: (string|null); + + /** ValidateEventThreatDetectionCustomModuleRequest rawText */ + rawText?: (string|null); + + /** ValidateEventThreatDetectionCustomModuleRequest type */ + type?: (string|null); + } + + /** Represents a ValidateEventThreatDetectionCustomModuleRequest. */ + class ValidateEventThreatDetectionCustomModuleRequest implements IValidateEventThreatDetectionCustomModuleRequest { + + /** + * Constructs a new ValidateEventThreatDetectionCustomModuleRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest); + + /** ValidateEventThreatDetectionCustomModuleRequest parent. */ + public parent: string; + + /** ValidateEventThreatDetectionCustomModuleRequest rawText. */ + public rawText: string; + + /** ValidateEventThreatDetectionCustomModuleRequest type. */ + public type: string; + + /** + * Creates a new ValidateEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateEventThreatDetectionCustomModuleRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; + + /** + * Verifies a ValidateEventThreatDetectionCustomModuleRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateEventThreatDetectionCustomModuleRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; + + /** + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @param message ValidateEventThreatDetectionCustomModuleRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidateEventThreatDetectionCustomModuleRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValidateEventThreatDetectionCustomModuleRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ValidateEventThreatDetectionCustomModuleResponse. */ + interface IValidateEventThreatDetectionCustomModuleResponse { + + /** ValidateEventThreatDetectionCustomModuleResponse errors */ + errors?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError[]|null); + } + + /** Represents a ValidateEventThreatDetectionCustomModuleResponse. */ + class ValidateEventThreatDetectionCustomModuleResponse implements IValidateEventThreatDetectionCustomModuleResponse { + + /** + * Constructs a new ValidateEventThreatDetectionCustomModuleResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse); + + /** ValidateEventThreatDetectionCustomModuleResponse errors. */ + public errors: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError[]; + + /** + * Creates a new ValidateEventThreatDetectionCustomModuleResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidateEventThreatDetectionCustomModuleResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. + * @param message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidateEventThreatDetectionCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidateEventThreatDetectionCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; + + /** + * Verifies a ValidateEventThreatDetectionCustomModuleResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidateEventThreatDetectionCustomModuleResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidateEventThreatDetectionCustomModuleResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; + + /** + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleResponse message. Also converts values to other types if specified. + * @param message ValidateEventThreatDetectionCustomModuleResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidateEventThreatDetectionCustomModuleResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValidateEventThreatDetectionCustomModuleResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ValidateEventThreatDetectionCustomModuleResponse { + + /** Properties of a CustomModuleValidationError. */ + interface ICustomModuleValidationError { + + /** CustomModuleValidationError description */ + description?: (string|null); + + /** CustomModuleValidationError fieldPath */ + fieldPath?: (string|null); + + /** CustomModuleValidationError start */ + start?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); + + /** CustomModuleValidationError end */ + end?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); + } + + /** Represents a CustomModuleValidationError. */ + class CustomModuleValidationError implements ICustomModuleValidationError { + + /** + * Constructs a new CustomModuleValidationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError); + + /** CustomModuleValidationError description. */ + public description: string; + + /** CustomModuleValidationError fieldPath. */ + public fieldPath: string; + + /** CustomModuleValidationError start. */ + public start?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); + + /** CustomModuleValidationError end. */ + public end?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); + + /** CustomModuleValidationError _start. */ + public _start?: "start"; + + /** CustomModuleValidationError _end. */ + public _end?: "end"; + + /** + * Creates a new CustomModuleValidationError instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomModuleValidationError instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; + + /** + * Encodes the specified CustomModuleValidationError message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. + * @param message CustomModuleValidationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomModuleValidationError message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. + * @param message CustomModuleValidationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomModuleValidationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomModuleValidationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; + + /** + * Decodes a CustomModuleValidationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomModuleValidationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; + + /** + * Verifies a CustomModuleValidationError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomModuleValidationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomModuleValidationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; + + /** + * Creates a plain object from a CustomModuleValidationError message. Also converts values to other types if specified. + * @param message CustomModuleValidationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomModuleValidationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomModuleValidationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Position. */ + interface IPosition { + + /** Position lineNumber */ + lineNumber?: (number|null); + + /** Position columnNumber */ + columnNumber?: (number|null); + } + + /** Represents a Position. */ + class Position implements IPosition { + + /** + * Constructs a new Position. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition); + + /** Position lineNumber. */ + public lineNumber: number; + + /** Position columnNumber. */ + public columnNumber: number; + + /** + * Creates a new Position instance using the specified properties. + * @param [properties] Properties to set + * @returns Position instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; + + /** + * Encodes the specified Position message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. + * @param message Position message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. + * @param message Position message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Position message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; + + /** + * Decodes a Position message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; + + /** + * Verifies a Position message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Position message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Position + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; + + /** + * Creates a plain object from a Position message. Also converts values to other types if specified. + * @param message Position + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Position to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Position + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GetSecurityCenterServiceRequest. */ + interface IGetSecurityCenterServiceRequest { + + /** GetSecurityCenterServiceRequest name */ + name?: (string|null); + + /** GetSecurityCenterServiceRequest showEligibleModulesOnly */ + showEligibleModulesOnly?: (boolean|null); + } + + /** Represents a GetSecurityCenterServiceRequest. */ + class GetSecurityCenterServiceRequest implements IGetSecurityCenterServiceRequest { + + /** + * Constructs a new GetSecurityCenterServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest); + + /** GetSecurityCenterServiceRequest name. */ + public name: string; + + /** GetSecurityCenterServiceRequest showEligibleModulesOnly. */ + public showEligibleModulesOnly: boolean; + + /** + * Creates a new GetSecurityCenterServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSecurityCenterServiceRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; + + /** + * Encodes the specified GetSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. + * @param message GetSecurityCenterServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. + * @param message GetSecurityCenterServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; + + /** + * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; + + /** + * Verifies a GetSecurityCenterServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSecurityCenterServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; + + /** + * Creates a plain object from a GetSecurityCenterServiceRequest message. Also converts values to other types if specified. + * @param message GetSecurityCenterServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSecurityCenterServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSecurityCenterServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSecurityCenterServicesRequest. */ + interface IListSecurityCenterServicesRequest { + + /** ListSecurityCenterServicesRequest parent */ + parent?: (string|null); + + /** ListSecurityCenterServicesRequest pageSize */ + pageSize?: (number|null); + + /** ListSecurityCenterServicesRequest pageToken */ + pageToken?: (string|null); + + /** ListSecurityCenterServicesRequest showEligibleModulesOnly */ + showEligibleModulesOnly?: (boolean|null); + } + + /** Represents a ListSecurityCenterServicesRequest. */ + class ListSecurityCenterServicesRequest implements IListSecurityCenterServicesRequest { + + /** + * Constructs a new ListSecurityCenterServicesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest); + + /** ListSecurityCenterServicesRequest parent. */ + public parent: string; + + /** ListSecurityCenterServicesRequest pageSize. */ + public pageSize: number; + + /** ListSecurityCenterServicesRequest pageToken. */ + public pageToken: string; + + /** ListSecurityCenterServicesRequest showEligibleModulesOnly. */ + public showEligibleModulesOnly: boolean; + + /** + * Creates a new ListSecurityCenterServicesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecurityCenterServicesRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; + + /** + * Encodes the specified ListSecurityCenterServicesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. + * @param message ListSecurityCenterServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecurityCenterServicesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. + * @param message ListSecurityCenterServicesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecurityCenterServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; + + /** + * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecurityCenterServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; + + /** + * Verifies a ListSecurityCenterServicesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSecurityCenterServicesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecurityCenterServicesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; + + /** + * Creates a plain object from a ListSecurityCenterServicesRequest message. Also converts values to other types if specified. + * @param message ListSecurityCenterServicesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecurityCenterServicesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSecurityCenterServicesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSecurityCenterServicesResponse. */ + interface IListSecurityCenterServicesResponse { + + /** ListSecurityCenterServicesResponse securityCenterServices */ + securityCenterServices?: (google.cloud.securitycentermanagement.v1.ISecurityCenterService[]|null); + + /** ListSecurityCenterServicesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListSecurityCenterServicesResponse. */ + class ListSecurityCenterServicesResponse implements IListSecurityCenterServicesResponse { + + /** + * Constructs a new ListSecurityCenterServicesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse); + + /** ListSecurityCenterServicesResponse securityCenterServices. */ + public securityCenterServices: google.cloud.securitycentermanagement.v1.ISecurityCenterService[]; + + /** ListSecurityCenterServicesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListSecurityCenterServicesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSecurityCenterServicesResponse instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; + + /** + * Encodes the specified ListSecurityCenterServicesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. + * @param message ListSecurityCenterServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSecurityCenterServicesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. + * @param message ListSecurityCenterServicesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSecurityCenterServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; + + /** + * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSecurityCenterServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; + + /** + * Verifies a ListSecurityCenterServicesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSecurityCenterServicesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSecurityCenterServicesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; + + /** + * Creates a plain object from a ListSecurityCenterServicesResponse message. Also converts values to other types if specified. + * @param message ListSecurityCenterServicesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSecurityCenterServicesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSecurityCenterServicesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSecurityCenterServiceRequest. */ + interface IUpdateSecurityCenterServiceRequest { + + /** UpdateSecurityCenterServiceRequest securityCenterService */ + securityCenterService?: (google.cloud.securitycentermanagement.v1.ISecurityCenterService|null); + + /** UpdateSecurityCenterServiceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSecurityCenterServiceRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents an UpdateSecurityCenterServiceRequest. */ + class UpdateSecurityCenterServiceRequest implements IUpdateSecurityCenterServiceRequest { + + /** + * Constructs a new UpdateSecurityCenterServiceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest); + + /** UpdateSecurityCenterServiceRequest securityCenterService. */ + public securityCenterService?: (google.cloud.securitycentermanagement.v1.ISecurityCenterService|null); + + /** UpdateSecurityCenterServiceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateSecurityCenterServiceRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new UpdateSecurityCenterServiceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSecurityCenterServiceRequest instance + */ + public static create(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; + + /** + * Encodes the specified UpdateSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. + * @param message UpdateSecurityCenterServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. + * @param message UpdateSecurityCenterServiceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; + + /** + * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; + + /** + * Verifies an UpdateSecurityCenterServiceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSecurityCenterServiceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; + + /** + * Creates a plain object from an UpdateSecurityCenterServiceRequest message. Also converts values to other types if specified. + * @param message UpdateSecurityCenterServiceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSecurityCenterServiceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSecurityCenterServiceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of 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; + } + + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { + + /** + * Constructs a new Struct. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStruct); + + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; + + /** + * Creates a new Struct instance using the specified properties. + * @param [properties] Properties to set + * @returns Struct instance + */ + public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @param message Struct message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; + + /** + * Verifies a Struct message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Struct + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Struct to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue */ + numberValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value boolValue */ + boolValue?: (boolean|null); + + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); + + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IValue); + + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); + + /** Value numberValue. */ + public numberValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value boolValue. */ + public boolValue?: (boolean|null); + + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); + + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); + + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.protobuf.IValue): google.protobuf.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullValue enum. */ + enum NullValue { + NULL_VALUE = 0 + } + + /** Properties of a ListValue. */ + interface IListValue { + + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } + + /** Represents a ListValue. */ + class ListValue implements IListValue { + + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); + + /** ListValue values. */ + public values: google.protobuf.IValue[]; + + /** + * Creates a new ListValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ListValue instance + */ + public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @param message ListValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; + + /** + * Verifies a ListValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + + /** Policy etag */ + etag?: (Uint8Array|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + + /** Policy etag. */ + public etag: (Uint8Array|string); + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; + + /** + * Verifies an Expr message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js new file mode 100644 index 00000000000..1b7df205cc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js @@ -0,0 +1,35369 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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_securitycentermanagement_protos || ($protobuf.roots._google_cloud_securitycentermanagement_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.securitycentermanagement = (function() { + + /** + * Namespace securitycentermanagement. + * @memberof google.cloud + * @namespace + */ + var securitycentermanagement = {}; + + securitycentermanagement.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.securitycentermanagement + * @namespace + */ + var v1 = {}; + + v1.SecurityCenterManagement = (function() { + + /** + * Constructs a new SecurityCenterManagement service. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a SecurityCenterManagement + * @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 SecurityCenterManagement(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SecurityCenterManagement.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenterManagement; + + /** + * Creates new SecurityCenterManagement service using the specified rpc implementation. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @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 {SecurityCenterManagement} RPC service. Useful where requests and/or responses are streamed. + */ + SecurityCenterManagement.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveSecurityHealthAnalyticsCustomModules}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ListEffectiveSecurityHealthAnalyticsCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ + + /** + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @function listEffectiveSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.listEffectiveSecurityHealthAnalyticsCustomModules = function listEffectiveSecurityHealthAnalyticsCustomModules(request, callback) { + return this.rpcCall(listEffectiveSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, request, callback); + }, "name", { value: "ListEffectiveSecurityHealthAnalyticsCustomModules" }); + + /** + * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. + * @function listEffectiveSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef GetEffectiveSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} [response] EffectiveSecurityHealthAnalyticsCustomModule + */ + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @function getEffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.getEffectiveSecurityHealthAnalyticsCustomModule = function getEffectiveSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(getEffectiveSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "GetEffectiveSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. + * @function getEffectiveSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityHealthAnalyticsCustomModules}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ListSecurityHealthAnalyticsCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} [response] ListSecurityHealthAnalyticsCustomModulesResponse + */ + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @function listSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.listSecurityHealthAnalyticsCustomModules = function listSecurityHealthAnalyticsCustomModules(request, callback) { + return this.rpcCall(listSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse, request, callback); + }, "name", { value: "ListSecurityHealthAnalyticsCustomModules" }); + + /** + * Calls ListSecurityHealthAnalyticsCustomModules. + * @function listSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantSecurityHealthAnalyticsCustomModules}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ListDescendantSecurityHealthAnalyticsCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @function listDescendantSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.listDescendantSecurityHealthAnalyticsCustomModules = function listDescendantSecurityHealthAnalyticsCustomModules(request, callback) { + return this.rpcCall(listDescendantSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, request, callback); + }, "name", { value: "ListDescendantSecurityHealthAnalyticsCustomModules" }); + + /** + * Calls ListDescendantSecurityHealthAnalyticsCustomModules. + * @function listDescendantSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef GetSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + */ + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @function getSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.getSecurityHealthAnalyticsCustomModule = function getSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(getSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "GetSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls GetSecurityHealthAnalyticsCustomModule. + * @function getSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef CreateSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + */ + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @function createSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.createSecurityHealthAnalyticsCustomModule = function createSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(createSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "CreateSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls CreateSecurityHealthAnalyticsCustomModule. + * @function createSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef UpdateSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule + */ + + /** + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @function updateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.updateSecurityHealthAnalyticsCustomModule = function updateSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(updateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, request, callback); + }, "name", { value: "UpdateSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls UpdateSecurityHealthAnalyticsCustomModule. + * @function updateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef DeleteSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @function deleteSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.deleteSecurityHealthAnalyticsCustomModule = function deleteSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(deleteSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls DeleteSecurityHealthAnalyticsCustomModule. + * @function deleteSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|simulateSecurityHealthAnalyticsCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef SimulateSecurityHealthAnalyticsCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} [response] SimulateSecurityHealthAnalyticsCustomModuleResponse + */ + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @function simulateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.simulateSecurityHealthAnalyticsCustomModule = function simulateSecurityHealthAnalyticsCustomModule(request, callback) { + return this.rpcCall(simulateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, request, callback); + }, "name", { value: "SimulateSecurityHealthAnalyticsCustomModule" }); + + /** + * Calls SimulateSecurityHealthAnalyticsCustomModule. + * @function simulateSecurityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveEventThreatDetectionCustomModules}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ListEffectiveEventThreatDetectionCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} [response] ListEffectiveEventThreatDetectionCustomModulesResponse + */ + + /** + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @function listEffectiveEventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEffectiveEventThreatDetectionCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.listEffectiveEventThreatDetectionCustomModules = function listEffectiveEventThreatDetectionCustomModules(request, callback) { + return this.rpcCall(listEffectiveEventThreatDetectionCustomModules, $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse, request, callback); + }, "name", { value: "ListEffectiveEventThreatDetectionCustomModules" }); + + /** + * Calls ListEffectiveEventThreatDetectionCustomModules. + * @function listEffectiveEventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef GetEffectiveEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} [response] EffectiveEventThreatDetectionCustomModule + */ + + /** + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @function getEffectiveEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EffectiveEventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.getEffectiveEventThreatDetectionCustomModule = function getEffectiveEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(getEffectiveEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule, request, callback); + }, "name", { value: "GetEffectiveEventThreatDetectionCustomModule" }); + + /** + * Calls GetEffectiveEventThreatDetectionCustomModule. + * @function getEffectiveEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEventThreatDetectionCustomModules}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ListEventThreatDetectionCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} [response] ListEventThreatDetectionCustomModulesResponse + */ + + /** + * Calls ListEventThreatDetectionCustomModules. + * @function listEventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} request ListEventThreatDetectionCustomModulesRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEventThreatDetectionCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.listEventThreatDetectionCustomModules = function listEventThreatDetectionCustomModules(request, callback) { + return this.rpcCall(listEventThreatDetectionCustomModules, $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse, request, callback); + }, "name", { value: "ListEventThreatDetectionCustomModules" }); + + /** + * Calls ListEventThreatDetectionCustomModules. + * @function listEventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} request ListEventThreatDetectionCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantEventThreatDetectionCustomModules}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ListDescendantEventThreatDetectionCustomModulesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} [response] ListDescendantEventThreatDetectionCustomModulesResponse + */ + + /** + * Calls ListDescendantEventThreatDetectionCustomModules. + * @function listDescendantEventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListDescendantEventThreatDetectionCustomModulesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.listDescendantEventThreatDetectionCustomModules = function listDescendantEventThreatDetectionCustomModules(request, callback) { + return this.rpcCall(listDescendantEventThreatDetectionCustomModules, $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse, request, callback); + }, "name", { value: "ListDescendantEventThreatDetectionCustomModules" }); + + /** + * Calls ListDescendantEventThreatDetectionCustomModules. + * @function listDescendantEventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef GetEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule + */ + + /** + * Calls GetEventThreatDetectionCustomModule. + * @function getEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} request GetEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.getEventThreatDetectionCustomModule = function getEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(getEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, request, callback); + }, "name", { value: "GetEventThreatDetectionCustomModule" }); + + /** + * Calls GetEventThreatDetectionCustomModule. + * @function getEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} request GetEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef CreateEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule + */ + + /** + * Calls CreateEventThreatDetectionCustomModule. + * @function createEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.createEventThreatDetectionCustomModule = function createEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(createEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, request, callback); + }, "name", { value: "CreateEventThreatDetectionCustomModule" }); + + /** + * Calls CreateEventThreatDetectionCustomModule. + * @function createEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} request CreateEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef UpdateEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule + */ + + /** + * Calls UpdateEventThreatDetectionCustomModule. + * @function updateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.updateEventThreatDetectionCustomModule = function updateEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(updateEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, request, callback); + }, "name", { value: "UpdateEventThreatDetectionCustomModule" }); + + /** + * Calls UpdateEventThreatDetectionCustomModule. + * @function updateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} request UpdateEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef DeleteEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteEventThreatDetectionCustomModule. + * @function deleteEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.deleteEventThreatDetectionCustomModule = function deleteEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(deleteEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteEventThreatDetectionCustomModule" }); + + /** + * Calls DeleteEventThreatDetectionCustomModule. + * @function deleteEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} request DeleteEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|validateEventThreatDetectionCustomModule}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ValidateEventThreatDetectionCustomModuleCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} [response] ValidateEventThreatDetectionCustomModuleResponse + */ + + /** + * Calls ValidateEventThreatDetectionCustomModule. + * @function validateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and ValidateEventThreatDetectionCustomModuleResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.validateEventThreatDetectionCustomModule = function validateEventThreatDetectionCustomModule(request, callback) { + return this.rpcCall(validateEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse, request, callback); + }, "name", { value: "ValidateEventThreatDetectionCustomModule" }); + + /** + * Calls ValidateEventThreatDetectionCustomModule. + * @function validateEventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} request ValidateEventThreatDetectionCustomModuleRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityCenterService}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef GetSecurityCenterServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} [response] SecurityCenterService + */ + + /** + * Calls GetSecurityCenterService. + * @function getSecurityCenterService + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} request GetSecurityCenterServiceRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterServiceCallback} callback Node-style callback called with the error, if any, and SecurityCenterService + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.getSecurityCenterService = function getSecurityCenterService(request, callback) { + return this.rpcCall(getSecurityCenterService, $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest, $root.google.cloud.securitycentermanagement.v1.SecurityCenterService, request, callback); + }, "name", { value: "GetSecurityCenterService" }); + + /** + * Calls GetSecurityCenterService. + * @function getSecurityCenterService + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} request GetSecurityCenterServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityCenterServices}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef ListSecurityCenterServicesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} [response] ListSecurityCenterServicesResponse + */ + + /** + * Calls ListSecurityCenterServices. + * @function listSecurityCenterServices + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} request ListSecurityCenterServicesRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServicesCallback} callback Node-style callback called with the error, if any, and ListSecurityCenterServicesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.listSecurityCenterServices = function listSecurityCenterServices(request, callback) { + return this.rpcCall(listSecurityCenterServices, $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest, $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse, request, callback); + }, "name", { value: "ListSecurityCenterServices" }); + + /** + * Calls ListSecurityCenterServices. + * @function listSecurityCenterServices + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} request ListSecurityCenterServicesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityCenterService}. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @typedef UpdateSecurityCenterServiceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} [response] SecurityCenterService + */ + + /** + * Calls UpdateSecurityCenterService. + * @function updateSecurityCenterService + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} request UpdateSecurityCenterServiceRequest message or plain object + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterServiceCallback} callback Node-style callback called with the error, if any, and SecurityCenterService + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SecurityCenterManagement.prototype.updateSecurityCenterService = function updateSecurityCenterService(request, callback) { + return this.rpcCall(updateSecurityCenterService, $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest, $root.google.cloud.securitycentermanagement.v1.SecurityCenterService, request, callback); + }, "name", { value: "UpdateSecurityCenterService" }); + + /** + * Calls UpdateSecurityCenterService. + * @function updateSecurityCenterService + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement + * @instance + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} request UpdateSecurityCenterServiceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SecurityCenterManagement; + })(); + + v1.SecurityCenterService = (function() { + + /** + * Properties of a SecurityCenterService. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ISecurityCenterService + * @property {string|null} [name] SecurityCenterService name + * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [intendedEnablementState] SecurityCenterService intendedEnablementState + * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [effectiveEnablementState] SecurityCenterService effectiveEnablementState + * @property {Object.|null} [modules] SecurityCenterService modules + * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityCenterService updateTime + * @property {google.protobuf.IStruct|null} [serviceConfig] SecurityCenterService serviceConfig + */ + + /** + * Constructs a new SecurityCenterService. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a SecurityCenterService. + * @implements ISecurityCenterService + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService=} [properties] Properties to set + */ + function SecurityCenterService(properties) { + this.modules = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityCenterService name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @instance + */ + SecurityCenterService.prototype.name = ""; + + /** + * SecurityCenterService intendedEnablementState. + * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} intendedEnablementState + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @instance + */ + SecurityCenterService.prototype.intendedEnablementState = 0; + + /** + * SecurityCenterService effectiveEnablementState. + * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} effectiveEnablementState + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @instance + */ + SecurityCenterService.prototype.effectiveEnablementState = 0; + + /** + * SecurityCenterService modules. + * @member {Object.} modules + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @instance + */ + SecurityCenterService.prototype.modules = $util.emptyObject; + + /** + * SecurityCenterService updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @instance + */ + SecurityCenterService.prototype.updateTime = null; + + /** + * SecurityCenterService serviceConfig. + * @member {google.protobuf.IStruct|null|undefined} serviceConfig + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @instance + */ + SecurityCenterService.prototype.serviceConfig = null; + + /** + * Creates a new SecurityCenterService instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService instance + */ + SecurityCenterService.create = function create(properties) { + return new SecurityCenterService(properties); + }; + + /** + * Encodes the specified SecurityCenterService message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService} message SecurityCenterService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityCenterService.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.intendedEnablementState != null && Object.hasOwnProperty.call(message, "intendedEnablementState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.intendedEnablementState); + if (message.effectiveEnablementState != null && Object.hasOwnProperty.call(message, "effectiveEnablementState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.effectiveEnablementState); + if (message.modules != null && Object.hasOwnProperty.call(message, "modules")) + for (var keys = Object.keys(message.modules), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.encode(message.modules[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.serviceConfig != null && Object.hasOwnProperty.call(message, "serviceConfig")) + $root.google.protobuf.Struct.encode(message.serviceConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityCenterService message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService} message SecurityCenterService message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityCenterService.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityCenterService message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityCenterService.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.intendedEnablementState = reader.int32(); + break; + } + case 3: { + message.effectiveEnablementState = reader.int32(); + break; + } + case 4: { + if (message.modules === $util.emptyObject) + message.modules = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.modules[key] = value; + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.serviceConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityCenterService message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityCenterService.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityCenterService message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityCenterService.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) + switch (message.intendedEnablementState) { + default: + return "intendedEnablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) + switch (message.effectiveEnablementState) { + default: + return "effectiveEnablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.modules != null && message.hasOwnProperty("modules")) { + if (!$util.isObject(message.modules)) + return "modules: object expected"; + var key = Object.keys(message.modules); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify(message.modules[key[i]]); + if (error) + return "modules." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) { + var error = $root.google.protobuf.Struct.verify(message.serviceConfig); + if (error) + return "serviceConfig." + error; + } + return null; + }; + + /** + * Creates a SecurityCenterService message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService + */ + SecurityCenterService.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SecurityCenterService) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService(); + if (object.name != null) + message.name = String(object.name); + switch (object.intendedEnablementState) { + default: + if (typeof object.intendedEnablementState === "number") { + message.intendedEnablementState = object.intendedEnablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.intendedEnablementState = 0; + break; + case "INHERITED": + case 1: + message.intendedEnablementState = 1; + break; + case "ENABLED": + case 2: + message.intendedEnablementState = 2; + break; + case "DISABLED": + case 3: + message.intendedEnablementState = 3; + break; + case "INGEST_ONLY": + case 4: + message.intendedEnablementState = 4; + break; + } + switch (object.effectiveEnablementState) { + default: + if (typeof object.effectiveEnablementState === "number") { + message.effectiveEnablementState = object.effectiveEnablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.effectiveEnablementState = 0; + break; + case "INHERITED": + case 1: + message.effectiveEnablementState = 1; + break; + case "ENABLED": + case 2: + message.effectiveEnablementState = 2; + break; + case "DISABLED": + case 3: + message.effectiveEnablementState = 3; + break; + case "INGEST_ONLY": + case 4: + message.effectiveEnablementState = 4; + break; + } + if (object.modules) { + if (typeof object.modules !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.modules: object expected"); + message.modules = {}; + for (var keys = Object.keys(object.modules), i = 0; i < keys.length; ++i) { + if (typeof object.modules[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.modules: object expected"); + message.modules[keys[i]] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.fromObject(object.modules[keys[i]]); + } + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.serviceConfig != null) { + if (typeof object.serviceConfig !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.serviceConfig: object expected"); + message.serviceConfig = $root.google.protobuf.Struct.fromObject(object.serviceConfig); + } + return message; + }; + + /** + * Creates a plain object from a SecurityCenterService message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} message SecurityCenterService + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityCenterService.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.modules = {}; + if (options.defaults) { + object.name = ""; + object.intendedEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.effectiveEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.updateTime = null; + object.serviceConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) + object.intendedEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] === undefined ? message.intendedEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] : message.intendedEnablementState; + if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) + object.effectiveEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] === undefined ? message.effectiveEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] : message.effectiveEnablementState; + var keys2; + if (message.modules && (keys2 = Object.keys(message.modules)).length) { + object.modules = {}; + for (var j = 0; j < keys2.length; ++j) + object.modules[keys2[j]] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.toObject(message.modules[keys2[j]], options); + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) + object.serviceConfig = $root.google.protobuf.Struct.toObject(message.serviceConfig, options); + return object; + }; + + /** + * Converts this SecurityCenterService to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @instance + * @returns {Object.} JSON object + */ + SecurityCenterService.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityCenterService + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityCenterService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SecurityCenterService"; + }; + + SecurityCenterService.ModuleSettings = (function() { + + /** + * Properties of a ModuleSettings. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @interface IModuleSettings + * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [intendedEnablementState] ModuleSettings intendedEnablementState + * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [effectiveEnablementState] ModuleSettings effectiveEnablementState + */ + + /** + * Constructs a new ModuleSettings. + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService + * @classdesc Represents a ModuleSettings. + * @implements IModuleSettings + * @constructor + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings=} [properties] Properties to set + */ + function ModuleSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModuleSettings intendedEnablementState. + * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} intendedEnablementState + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @instance + */ + ModuleSettings.prototype.intendedEnablementState = 0; + + /** + * ModuleSettings effectiveEnablementState. + * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} effectiveEnablementState + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @instance + */ + ModuleSettings.prototype.effectiveEnablementState = 0; + + /** + * Creates a new ModuleSettings instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings instance + */ + ModuleSettings.create = function create(properties) { + return new ModuleSettings(properties); + }; + + /** + * Encodes the specified ModuleSettings message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings} message ModuleSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModuleSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.intendedEnablementState != null && Object.hasOwnProperty.call(message, "intendedEnablementState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.intendedEnablementState); + if (message.effectiveEnablementState != null && Object.hasOwnProperty.call(message, "effectiveEnablementState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.effectiveEnablementState); + return writer; + }; + + /** + * Encodes the specified ModuleSettings message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings} message ModuleSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModuleSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModuleSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModuleSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.intendedEnablementState = reader.int32(); + break; + } + case 2: { + message.effectiveEnablementState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModuleSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModuleSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModuleSettings message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModuleSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) + switch (message.intendedEnablementState) { + default: + return "intendedEnablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) + switch (message.effectiveEnablementState) { + default: + return "effectiveEnablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a ModuleSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings + */ + ModuleSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings(); + switch (object.intendedEnablementState) { + default: + if (typeof object.intendedEnablementState === "number") { + message.intendedEnablementState = object.intendedEnablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.intendedEnablementState = 0; + break; + case "INHERITED": + case 1: + message.intendedEnablementState = 1; + break; + case "ENABLED": + case 2: + message.intendedEnablementState = 2; + break; + case "DISABLED": + case 3: + message.intendedEnablementState = 3; + break; + case "INGEST_ONLY": + case 4: + message.intendedEnablementState = 4; + break; + } + switch (object.effectiveEnablementState) { + default: + if (typeof object.effectiveEnablementState === "number") { + message.effectiveEnablementState = object.effectiveEnablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.effectiveEnablementState = 0; + break; + case "INHERITED": + case 1: + message.effectiveEnablementState = 1; + break; + case "ENABLED": + case 2: + message.effectiveEnablementState = 2; + break; + case "DISABLED": + case 3: + message.effectiveEnablementState = 3; + break; + case "INGEST_ONLY": + case 4: + message.effectiveEnablementState = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a ModuleSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} message ModuleSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModuleSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.intendedEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.effectiveEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + } + if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) + object.intendedEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] === undefined ? message.intendedEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] : message.intendedEnablementState; + if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) + object.effectiveEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] === undefined ? message.effectiveEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] : message.effectiveEnablementState; + return object; + }; + + /** + * Converts this ModuleSettings to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @instance + * @returns {Object.} JSON object + */ + ModuleSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ModuleSettings + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModuleSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings"; + }; + + return ModuleSettings; + })(); + + /** + * EnablementState enum. + * @name google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} INHERITED=1 INHERITED value + * @property {number} ENABLED=2 ENABLED value + * @property {number} DISABLED=3 DISABLED value + * @property {number} INGEST_ONLY=4 INGEST_ONLY value + */ + SecurityCenterService.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERITED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + values[valuesById[3] = "DISABLED"] = 3; + values[valuesById[4] = "INGEST_ONLY"] = 4; + return values; + })(); + + return SecurityCenterService; + })(); + + v1.EffectiveSecurityHealthAnalyticsCustomModule = (function() { + + /** + * Properties of an EffectiveSecurityHealthAnalyticsCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IEffectiveSecurityHealthAnalyticsCustomModule + * @property {string|null} [name] EffectiveSecurityHealthAnalyticsCustomModule name + * @property {google.cloud.securitycentermanagement.v1.ICustomConfig|null} [customConfig] EffectiveSecurityHealthAnalyticsCustomModule customConfig + * @property {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] EffectiveSecurityHealthAnalyticsCustomModule enablementState + * @property {string|null} [displayName] EffectiveSecurityHealthAnalyticsCustomModule displayName + */ + + /** + * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents an EffectiveSecurityHealthAnalyticsCustomModule. + * @implements IEffectiveSecurityHealthAnalyticsCustomModule + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set + */ + function EffectiveSecurityHealthAnalyticsCustomModule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EffectiveSecurityHealthAnalyticsCustomModule name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @instance + */ + EffectiveSecurityHealthAnalyticsCustomModule.prototype.name = ""; + + /** + * EffectiveSecurityHealthAnalyticsCustomModule customConfig. + * @member {google.cloud.securitycentermanagement.v1.ICustomConfig|null|undefined} customConfig + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @instance + */ + EffectiveSecurityHealthAnalyticsCustomModule.prototype.customConfig = null; + + /** + * EffectiveSecurityHealthAnalyticsCustomModule enablementState. + * @member {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @instance + */ + EffectiveSecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; + + /** + * EffectiveSecurityHealthAnalyticsCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @instance + */ + EffectiveSecurityHealthAnalyticsCustomModule.prototype.displayName = ""; + + /** + * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule instance + */ + EffectiveSecurityHealthAnalyticsCustomModule.create = function create(properties) { + return new EffectiveSecurityHealthAnalyticsCustomModule(properties); + }; + + /** + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EffectiveSecurityHealthAnalyticsCustomModule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) + $root.google.cloud.securitycentermanagement.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EffectiveSecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EffectiveSecurityHealthAnalyticsCustomModule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.enablementState = reader.int32(); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EffectiveSecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EffectiveSecurityHealthAnalyticsCustomModule message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EffectiveSecurityHealthAnalyticsCustomModule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) { + var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.verify(message.customConfig); + if (error) + return "customConfig." + error; + } + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: 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"; + return null; + }; + + /** + * Creates an EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule + */ + EffectiveSecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule(); + if (object.name != null) + message.name = String(object.name); + if (object.customConfig != null) { + if (typeof object.customConfig !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.customConfig: object expected"); + message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.fromObject(object.customConfig); + } + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "ENABLED": + case 1: + message.enablementState = 1; + break; + case "DISABLED": + case 2: + message.enablementState = 2; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EffectiveSecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.customConfig = null; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) + object.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.toObject(message.customConfig, options); + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @instance + * @returns {Object.} JSON object + */ + EffectiveSecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EffectiveSecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule"; + }; + + /** + * EnablementState enum. + * @name google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + EffectiveSecurityHealthAnalyticsCustomModule.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + return EffectiveSecurityHealthAnalyticsCustomModule; + })(); + + v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = (function() { + + /** + * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @property {string|null} [parent] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent + * @property {number|null} [pageSize] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken + */ + + /** + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. + * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + */ + function ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; + + /** + * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; + + /** + * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { + return new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties); + }; + + /** + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest"; + }; + + return ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; + })(); + + v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = (function() { + + /** + * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @property {Array.|null} [effectiveSecurityHealthAnalyticsCustomModules] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules + * @property {string|null} [nextPageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken + */ + + /** + * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. + * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + */ + function ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties) { + this.effectiveSecurityHealthAnalyticsCustomModules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. + * @member {Array.} effectiveSecurityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.effectiveSecurityHealthAnalyticsCustomModules = $util.emptyArray; + + /** + * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { + return new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties); + }; + + /** + * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.effectiveSecurityHealthAnalyticsCustomModules.length) + for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) + $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.encode(message.effectiveSecurityHealthAnalyticsCustomModules[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 ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length)) + message.effectiveSecurityHealthAnalyticsCustomModules = []; + message.effectiveSecurityHealthAnalyticsCustomModules.push($root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.hasOwnProperty("effectiveSecurityHealthAnalyticsCustomModules")) { + if (!Array.isArray(message.effectiveSecurityHealthAnalyticsCustomModules)) + return "effectiveSecurityHealthAnalyticsCustomModules: array expected"; + for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify(message.effectiveSecurityHealthAnalyticsCustomModules[i]); + if (error) + return "effectiveSecurityHealthAnalyticsCustomModules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); + if (object.effectiveSecurityHealthAnalyticsCustomModules) { + if (!Array.isArray(object.effectiveSecurityHealthAnalyticsCustomModules)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: array expected"); + message.effectiveSecurityHealthAnalyticsCustomModules = []; + for (var i = 0; i < object.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { + if (typeof object.effectiveSecurityHealthAnalyticsCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: object expected"); + message.effectiveSecurityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.fromObject(object.effectiveSecurityHealthAnalyticsCustomModules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.effectiveSecurityHealthAnalyticsCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length) { + object.effectiveSecurityHealthAnalyticsCustomModules = []; + for (var j = 0; j < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++j) + object.effectiveSecurityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.toObject(message.effectiveSecurityHealthAnalyticsCustomModules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse"; + }; + + return ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; + })(); + + v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = (function() { + + /** + * Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [name] GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name + */ + + /** + * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. + * @implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + */ + function GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; + + /** + * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(properties); + }; + + /** + * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + 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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); + 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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + if (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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest"; + }; + + return GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.SecurityHealthAnalyticsCustomModule = (function() { + + /** + * Properties of a SecurityHealthAnalyticsCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ISecurityHealthAnalyticsCustomModule + * @property {string|null} [name] SecurityHealthAnalyticsCustomModule name + * @property {string|null} [displayName] SecurityHealthAnalyticsCustomModule displayName + * @property {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] SecurityHealthAnalyticsCustomModule enablementState + * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityHealthAnalyticsCustomModule updateTime + * @property {string|null} [lastEditor] SecurityHealthAnalyticsCustomModule lastEditor + * @property {string|null} [ancestorModule] SecurityHealthAnalyticsCustomModule ancestorModule + * @property {google.cloud.securitycentermanagement.v1.ICustomConfig|null} [customConfig] SecurityHealthAnalyticsCustomModule customConfig + */ + + /** + * Constructs a new SecurityHealthAnalyticsCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a SecurityHealthAnalyticsCustomModule. + * @implements ISecurityHealthAnalyticsCustomModule + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set + */ + function SecurityHealthAnalyticsCustomModule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecurityHealthAnalyticsCustomModule name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.name = ""; + + /** + * SecurityHealthAnalyticsCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.displayName = ""; + + /** + * SecurityHealthAnalyticsCustomModule enablementState. + * @member {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; + + /** + * SecurityHealthAnalyticsCustomModule updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.updateTime = null; + + /** + * SecurityHealthAnalyticsCustomModule lastEditor. + * @member {string} lastEditor + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.lastEditor = ""; + + /** + * SecurityHealthAnalyticsCustomModule ancestorModule. + * @member {string} ancestorModule + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.ancestorModule = ""; + + /** + * SecurityHealthAnalyticsCustomModule customConfig. + * @member {google.cloud.securitycentermanagement.v1.ICustomConfig|null|undefined} customConfig + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + */ + SecurityHealthAnalyticsCustomModule.prototype.customConfig = null; + + /** + * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule instance + */ + SecurityHealthAnalyticsCustomModule.create = function create(properties) { + return new SecurityHealthAnalyticsCustomModule(properties); + }; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityHealthAnalyticsCustomModule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastEditor != null && Object.hasOwnProperty.call(message, "lastEditor")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.lastEditor); + if (message.ancestorModule != null && Object.hasOwnProperty.call(message, "ancestorModule")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.ancestorModule); + if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) + $root.google.cloud.securitycentermanagement.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityHealthAnalyticsCustomModule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.enablementState = reader.int32(); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastEditor = reader.string(); + break; + } + case 6: { + message.ancestorModule = reader.string(); + break; + } + case 7: { + message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityHealthAnalyticsCustomModule message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityHealthAnalyticsCustomModule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + if (!$util.isString(message.lastEditor)) + return "lastEditor: string expected"; + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + if (!$util.isString(message.ancestorModule)) + return "ancestorModule: string expected"; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) { + var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.verify(message.customConfig); + if (error) + return "customConfig." + error; + } + return null; + }; + + /** + * Creates a SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule + */ + SecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "ENABLED": + case 1: + message.enablementState = 1; + break; + case "DISABLED": + case 2: + message.enablementState = 2; + break; + case "INHERITED": + case 3: + message.enablementState = 3; + break; + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastEditor != null) + message.lastEditor = String(object.lastEditor); + if (object.ancestorModule != null) + message.ancestorModule = String(object.ancestorModule); + if (object.customConfig != null) { + if (typeof object.customConfig !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.customConfig: object expected"); + message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.fromObject(object.customConfig); + } + return message; + }; + + /** + * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.updateTime = null; + object.lastEditor = ""; + object.ancestorModule = ""; + object.customConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + object.lastEditor = message.lastEditor; + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + object.ancestorModule = message.ancestorModule; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) + object.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.toObject(message.customConfig, options); + return object; + }; + + /** + * Converts this SecurityHealthAnalyticsCustomModule to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @instance + * @returns {Object.} JSON object + */ + SecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityHealthAnalyticsCustomModule + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule"; + }; + + /** + * EnablementState enum. + * @name google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} INHERITED=3 INHERITED value + */ + SecurityHealthAnalyticsCustomModule.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "INHERITED"] = 3; + return values; + })(); + + return SecurityHealthAnalyticsCustomModule; + })(); + + v1.CustomConfig = (function() { + + /** + * Properties of a CustomConfig. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ICustomConfig + * @property {google.type.IExpr|null} [predicate] CustomConfig predicate + * @property {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null} [customOutput] CustomConfig customOutput + * @property {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null} [resourceSelector] CustomConfig resourceSelector + * @property {google.cloud.securitycentermanagement.v1.CustomConfig.Severity|null} [severity] CustomConfig severity + * @property {string|null} [description] CustomConfig description + * @property {string|null} [recommendation] CustomConfig recommendation + */ + + /** + * Constructs a new CustomConfig. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a CustomConfig. + * @implements ICustomConfig + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ICustomConfig=} [properties] Properties to set + */ + function CustomConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomConfig predicate. + * @member {google.type.IExpr|null|undefined} predicate + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.predicate = null; + + /** + * CustomConfig customOutput. + * @member {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null|undefined} customOutput + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.customOutput = null; + + /** + * CustomConfig resourceSelector. + * @member {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null|undefined} resourceSelector + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.resourceSelector = null; + + /** + * CustomConfig severity. + * @member {google.cloud.securitycentermanagement.v1.CustomConfig.Severity} severity + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.severity = 0; + + /** + * CustomConfig description. + * @member {string} description + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.description = ""; + + /** + * CustomConfig recommendation. + * @member {string} recommendation + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @instance + */ + CustomConfig.prototype.recommendation = ""; + + /** + * Creates a new CustomConfig instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {google.cloud.securitycentermanagement.v1.ICustomConfig=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig instance + */ + CustomConfig.create = function create(properties) { + return new CustomConfig(properties); + }; + + /** + * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {google.cloud.securitycentermanagement.v1.ICustomConfig} message CustomConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.predicate != null && Object.hasOwnProperty.call(message, "predicate")) + $root.google.type.Expr.encode(message.predicate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customOutput != null && Object.hasOwnProperty.call(message, "customOutput")) + $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.encode(message.customOutput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceSelector != null && Object.hasOwnProperty.call(message, "resourceSelector")) + $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.encode(message.resourceSelector, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.severity); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.recommendation != null && Object.hasOwnProperty.call(message, "recommendation")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.recommendation); + return writer; + }; + + /** + * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {google.cloud.securitycentermanagement.v1.ICustomConfig} message CustomConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.predicate = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + case 2: { + message.customOutput = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resourceSelector = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.decode(reader, reader.uint32()); + break; + } + case 4: { + message.severity = reader.int32(); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.recommendation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomConfig message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.predicate != null && message.hasOwnProperty("predicate")) { + var error = $root.google.type.Expr.verify(message.predicate); + if (error) + return "predicate." + error; + } + if (message.customOutput != null && message.hasOwnProperty("customOutput")) { + var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify(message.customOutput); + if (error) + return "customOutput." + error; + } + if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) { + var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify(message.resourceSelector); + if (error) + return "resourceSelector." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.recommendation != null && message.hasOwnProperty("recommendation")) + if (!$util.isString(message.recommendation)) + return "recommendation: string expected"; + return null; + }; + + /** + * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig + */ + CustomConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig(); + if (object.predicate != null) { + if (typeof object.predicate !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.predicate: object expected"); + message.predicate = $root.google.type.Expr.fromObject(object.predicate); + } + if (object.customOutput != null) { + if (typeof object.customOutput !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.customOutput: object expected"); + message.customOutput = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.fromObject(object.customOutput); + } + if (object.resourceSelector != null) { + if (typeof object.resourceSelector !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.resourceSelector: object expected"); + message.resourceSelector = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.fromObject(object.resourceSelector); + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "CRITICAL": + case 1: + message.severity = 1; + break; + case "HIGH": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "LOW": + case 4: + message.severity = 4; + break; + } + if (object.description != null) + message.description = String(object.description); + if (object.recommendation != null) + message.recommendation = String(object.recommendation); + return message; + }; + + /** + * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig} message CustomConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.predicate = null; + object.customOutput = null; + object.resourceSelector = null; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.description = ""; + object.recommendation = ""; + } + if (message.predicate != null && message.hasOwnProperty("predicate")) + object.predicate = $root.google.type.Expr.toObject(message.predicate, options); + if (message.customOutput != null && message.hasOwnProperty("customOutput")) + object.customOutput = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.toObject(message.customOutput, options); + if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) + object.resourceSelector = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.toObject(message.resourceSelector, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.CustomConfig.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycentermanagement.v1.CustomConfig.Severity[message.severity] : message.severity; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.recommendation != null && message.hasOwnProperty("recommendation")) + object.recommendation = message.recommendation; + return object; + }; + + /** + * Converts this CustomConfig to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @instance + * @returns {Object.} JSON object + */ + CustomConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomConfig + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig"; + }; + + CustomConfig.CustomOutputSpec = (function() { + + /** + * Properties of a CustomOutputSpec. + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @interface ICustomOutputSpec + * @property {Array.|null} [properties] CustomOutputSpec properties + */ + + /** + * Constructs a new CustomOutputSpec. + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @classdesc Represents a CustomOutputSpec. + * @implements ICustomOutputSpec + * @constructor + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set + */ + function CustomOutputSpec(properties) { + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomOutputSpec properties. + * @member {Array.} properties + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @instance + */ + CustomOutputSpec.prototype.properties = $util.emptyArray; + + /** + * Creates a new CustomOutputSpec instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec instance + */ + CustomOutputSpec.create = function create(properties) { + return new CustomOutputSpec(properties); + }; + + /** + * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomOutputSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.encode(message.properties[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomOutputSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomOutputSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomOutputSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push($root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomOutputSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomOutputSpec message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomOutputSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify(message.properties[i]); + if (error) + return "properties." + error; + } + } + return null; + }; + + /** + * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec + */ + CustomOutputSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec(); + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) { + if (typeof object.properties[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.properties: object expected"); + message.properties[i] = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.fromObject(object.properties[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} message CustomOutputSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomOutputSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.properties = []; + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.toObject(message.properties[j], options); + } + return object; + }; + + /** + * Converts this CustomOutputSpec to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @instance + * @returns {Object.} JSON object + */ + CustomOutputSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomOutputSpec + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomOutputSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec"; + }; + + CustomOutputSpec.Property = (function() { + + /** + * Properties of a Property. + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @interface IProperty + * @property {string|null} [name] Property name + * @property {google.type.IExpr|null} [valueExpression] Property valueExpression + */ + + /** + * Constructs a new Property. + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec + * @classdesc Represents a Property. + * @implements IProperty + * @constructor + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set + */ + function Property(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Property name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @instance + */ + Property.prototype.name = ""; + + /** + * Property valueExpression. + * @member {google.type.IExpr|null|undefined} valueExpression + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @instance + */ + Property.prototype.valueExpression = null; + + /** + * Creates a new Property instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property instance + */ + Property.create = function create(properties) { + return new Property(properties); + }; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.valueExpression != null && Object.hasOwnProperty.call(message, "valueExpression")) + $root.google.type.Expr.encode(message.valueExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Property message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.valueExpression = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Property message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Property.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.valueExpression != null && message.hasOwnProperty("valueExpression")) { + var error = $root.google.type.Expr.verify(message.valueExpression); + if (error) + return "valueExpression." + error; + } + return null; + }; + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property + */ + Property.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property(); + if (object.name != null) + message.name = String(object.name); + if (object.valueExpression != null) { + if (typeof object.valueExpression !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.valueExpression: object expected"); + message.valueExpression = $root.google.type.Expr.fromObject(object.valueExpression); + } + return message; + }; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} message Property + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Property.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.valueExpression = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.valueExpression != null && message.hasOwnProperty("valueExpression")) + object.valueExpression = $root.google.type.Expr.toObject(message.valueExpression, options); + return object; + }; + + /** + * Converts this Property to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @instance + * @returns {Object.} JSON object + */ + Property.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Property + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property"; + }; + + return Property; + })(); + + return CustomOutputSpec; + })(); + + CustomConfig.ResourceSelector = (function() { + + /** + * Properties of a ResourceSelector. + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @interface IResourceSelector + * @property {Array.|null} [resourceTypes] ResourceSelector resourceTypes + */ + + /** + * Constructs a new ResourceSelector. + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig + * @classdesc Represents a ResourceSelector. + * @implements IResourceSelector + * @constructor + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector=} [properties] Properties to set + */ + function ResourceSelector(properties) { + this.resourceTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceSelector resourceTypes. + * @member {Array.} resourceTypes + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @instance + */ + ResourceSelector.prototype.resourceTypes = $util.emptyArray; + + /** + * Creates a new ResourceSelector instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector instance + */ + ResourceSelector.create = function create(properties) { + return new ResourceSelector(properties); + }; + + /** + * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSelector.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceTypes != null && message.resourceTypes.length) + for (var i = 0; i < message.resourceTypes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypes[i]); + return writer; + }; + + /** + * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceSelector.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceSelector message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSelector.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resourceTypes && message.resourceTypes.length)) + message.resourceTypes = []; + message.resourceTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceSelector.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceSelector message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceSelector.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceTypes != null && message.hasOwnProperty("resourceTypes")) { + if (!Array.isArray(message.resourceTypes)) + return "resourceTypes: array expected"; + for (var i = 0; i < message.resourceTypes.length; ++i) + if (!$util.isString(message.resourceTypes[i])) + return "resourceTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a ResourceSelector message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector + */ + ResourceSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector(); + if (object.resourceTypes) { + if (!Array.isArray(object.resourceTypes)) + throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.resourceTypes: array expected"); + message.resourceTypes = []; + for (var i = 0; i < object.resourceTypes.length; ++i) + message.resourceTypes[i] = String(object.resourceTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} message ResourceSelector + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceSelector.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resourceTypes = []; + if (message.resourceTypes && message.resourceTypes.length) { + object.resourceTypes = []; + for (var j = 0; j < message.resourceTypes.length; ++j) + object.resourceTypes[j] = message.resourceTypes[j]; + } + return object; + }; + + /** + * Converts this ResourceSelector to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @instance + * @returns {Object.} JSON object + */ + ResourceSelector.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceSelector + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector"; + }; + + return ResourceSelector; + })(); + + /** + * Severity enum. + * @name google.cloud.securitycentermanagement.v1.CustomConfig.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} HIGH=2 HIGH value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LOW=4 LOW value + */ + CustomConfig.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "HIGH"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LOW"] = 4; + return values; + })(); + + return CustomConfig; + })(); + + v1.ListSecurityHealthAnalyticsCustomModulesRequest = (function() { + + /** + * Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListSecurityHealthAnalyticsCustomModulesRequest + * @property {string|null} [parent] ListSecurityHealthAnalyticsCustomModulesRequest parent + * @property {number|null} [pageSize] ListSecurityHealthAnalyticsCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListSecurityHealthAnalyticsCustomModulesRequest pageToken + */ + + /** + * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesRequest. + * @implements IListSecurityHealthAnalyticsCustomModulesRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + */ + function ListSecurityHealthAnalyticsCustomModulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSecurityHealthAnalyticsCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; + + /** + * ListSecurityHealthAnalyticsCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; + + /** + * ListSecurityHealthAnalyticsCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest instance + */ + ListSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { + return new ListSecurityHealthAnalyticsCustomModulesRequest(properties); + }; + + /** + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest + */ + ListSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest"; + }; + + return ListSecurityHealthAnalyticsCustomModulesRequest; + })(); + + v1.ListSecurityHealthAnalyticsCustomModulesResponse = (function() { + + /** + * Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListSecurityHealthAnalyticsCustomModulesResponse + * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules + * @property {string|null} [nextPageToken] ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken + */ + + /** + * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesResponse. + * @implements IListSecurityHealthAnalyticsCustomModulesResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + */ + function ListSecurityHealthAnalyticsCustomModulesResponse(properties) { + this.securityHealthAnalyticsCustomModules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. + * @member {Array.} securityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @instance + */ + ListSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; + + /** + * ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @instance + */ + ListSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse instance + */ + ListSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { + return new ListSecurityHealthAnalyticsCustomModulesResponse(properties); + }; + + /** + * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) + $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[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 ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) + message.securityHealthAnalyticsCustomModules = []; + message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { + if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) + return "securityHealthAnalyticsCustomModules: array expected"; + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); + if (error) + return "securityHealthAnalyticsCustomModules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse + */ + ListSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); + if (object.securityHealthAnalyticsCustomModules) { + if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); + message.securityHealthAnalyticsCustomModules = []; + for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { + if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); + message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.securityHealthAnalyticsCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { + object.securityHealthAnalyticsCustomModules = []; + for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) + object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse"; + }; + + return ListSecurityHealthAnalyticsCustomModulesResponse; + })(); + + v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest = (function() { + + /** + * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @property {string|null} [parent] ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent + * @property {number|null} [pageSize] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken + */ + + /** + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. + * @implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + */ + function ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; + + /** + * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; + + /** + * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @instance + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { + return new ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties); + }; + + /** + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDescendantSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest"; + }; + + return ListDescendantSecurityHealthAnalyticsCustomModulesRequest; + })(); + + v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse = (function() { + + /** + * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules + * @property {string|null} [nextPageToken] ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken + */ + + /** + * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. + * @implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + */ + function ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties) { + this.securityHealthAnalyticsCustomModules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. + * @member {Array.} securityHealthAnalyticsCustomModules + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @instance + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; + + /** + * ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @instance + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { + return new ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties); + }; + + /** + * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) + $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[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 ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) + message.securityHealthAnalyticsCustomModules = []; + message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { + if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) + return "securityHealthAnalyticsCustomModules: array expected"; + for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); + if (error) + return "securityHealthAnalyticsCustomModules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); + if (object.securityHealthAnalyticsCustomModules) { + if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); + message.securityHealthAnalyticsCustomModules = []; + for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { + if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); + message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.securityHealthAnalyticsCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { + object.securityHealthAnalyticsCustomModules = []; + for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) + object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDescendantSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse"; + }; + + return ListDescendantSecurityHealthAnalyticsCustomModulesResponse; + })(); + + v1.GetSecurityHealthAnalyticsCustomModuleRequest = (function() { + + /** + * Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IGetSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [name] GetSecurityHealthAnalyticsCustomModuleRequest name + */ + + /** + * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a GetSecurityHealthAnalyticsCustomModuleRequest. + * @implements IGetSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + */ + function GetSecurityHealthAnalyticsCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSecurityHealthAnalyticsCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + GetSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; + + /** + * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest instance + */ + GetSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new GetSecurityHealthAnalyticsCustomModuleRequest(properties); + }; + + /** + * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + 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 GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); + 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 GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + if (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 GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest + */ + GetSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSecurityHealthAnalyticsCustomModuleRequest.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 GetSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + GetSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest"; + }; + + return GetSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.CreateSecurityHealthAnalyticsCustomModuleRequest = (function() { + + /** + * Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ICreateSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [parent] CreateSecurityHealthAnalyticsCustomModuleRequest parent + * @property {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule + * @property {boolean|null} [validateOnly] CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly + */ + + /** + * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. + * @implements ICreateSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + */ + function CreateSecurityHealthAnalyticsCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSecurityHealthAnalyticsCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; + + /** + * CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. + * @member {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; + + /** + * CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest instance + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new CreateSecurityHealthAnalyticsCustomModuleRequest(properties); + }; + + /** + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) + $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { + var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); + if (error) + return "securityHealthAnalyticsCustomModule." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.securityHealthAnalyticsCustomModule != null) { + if (typeof object.securityHealthAnalyticsCustomModule !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); + message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.securityHealthAnalyticsCustomModule = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) + object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest"; + }; + + return CreateSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.UpdateSecurityHealthAnalyticsCustomModuleRequest = (function() { + + /** + * Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IUpdateSecurityHealthAnalyticsCustomModuleRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask + * @property {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule + * @property {boolean|null} [validateOnly] UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly + */ + + /** + * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. + * @implements IUpdateSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + */ + function UpdateSecurityHealthAnalyticsCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.updateMask = null; + + /** + * UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. + * @member {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; + + /** + * UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest instance + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new UpdateSecurityHealthAnalyticsCustomModuleRequest(properties); + }; + + /** + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) + $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); + 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.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { + var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); + if (error) + return "securityHealthAnalyticsCustomModule." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.securityHealthAnalyticsCustomModule != null) { + if (typeof object.securityHealthAnalyticsCustomModule !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); + message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.securityHealthAnalyticsCustomModule = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) + object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest"; + }; + + return UpdateSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.DeleteSecurityHealthAnalyticsCustomModuleRequest = (function() { + + /** + * Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IDeleteSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [name] DeleteSecurityHealthAnalyticsCustomModuleRequest name + * @property {boolean|null} [validateOnly] DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly + */ + + /** + * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. + * @implements IDeleteSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + */ + function DeleteSecurityHealthAnalyticsCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSecurityHealthAnalyticsCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; + + /** + * DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest instance + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new DeleteSecurityHealthAnalyticsCustomModuleRequest(properties); + }; + + /** + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest"; + }; + + return DeleteSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.SimulateSecurityHealthAnalyticsCustomModuleRequest = (function() { + + /** + * Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ISimulateSecurityHealthAnalyticsCustomModuleRequest + * @property {string|null} [parent] SimulateSecurityHealthAnalyticsCustomModuleRequest parent + * @property {google.cloud.securitycentermanagement.v1.ICustomConfig|null} [customConfig] SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig + * @property {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null} [resource] SimulateSecurityHealthAnalyticsCustomModuleRequest resource + */ + + /** + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. + * @implements ISimulateSecurityHealthAnalyticsCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + */ + function SimulateSecurityHealthAnalyticsCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulateSecurityHealthAnalyticsCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; + + /** + * SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. + * @member {google.cloud.securitycentermanagement.v1.ICustomConfig|null|undefined} customConfig + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.customConfig = null; + + /** + * SimulateSecurityHealthAnalyticsCustomModuleRequest resource. + * @member {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null|undefined} resource + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @instance + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.resource = null; + + /** + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest instance + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { + return new SimulateSecurityHealthAnalyticsCustomModuleRequest(properties); + }; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.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.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) + $root.google.cloud.securitycentermanagement.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resource = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.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.customConfig != null && message.hasOwnProperty("customConfig")) { + var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.verify(message.customConfig); + if (error) + return "customConfig." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates a SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.customConfig != null) { + if (typeof object.customConfig !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.customConfig: object expected"); + message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.fromObject(object.customConfig); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.resource: object expected"); + message.resource = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.customConfig = null; + object.resource = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.customConfig != null && message.hasOwnProperty("customConfig")) + object.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.toObject(message.customConfig, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.toObject(message.resource, options); + return object; + }; + + /** + * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimulateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest"; + }; + + SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource = (function() { + + /** + * Properties of a SimulatedResource. + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @interface ISimulatedResource + * @property {string|null} [resourceType] SimulatedResource resourceType + * @property {google.protobuf.IStruct|null} [resourceData] SimulatedResource resourceData + * @property {google.iam.v1.IPolicy|null} [iamPolicyData] SimulatedResource iamPolicyData + */ + + /** + * Constructs a new SimulatedResource. + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest + * @classdesc Represents a SimulatedResource. + * @implements ISimulatedResource + * @constructor + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set + */ + function SimulatedResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulatedResource resourceType. + * @member {string} resourceType + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + */ + SimulatedResource.prototype.resourceType = ""; + + /** + * SimulatedResource resourceData. + * @member {google.protobuf.IStruct|null|undefined} resourceData + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + */ + SimulatedResource.prototype.resourceData = null; + + /** + * SimulatedResource iamPolicyData. + * @member {google.iam.v1.IPolicy|null|undefined} iamPolicyData + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + */ + SimulatedResource.prototype.iamPolicyData = null; + + /** + * Creates a new SimulatedResource instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource instance + */ + SimulatedResource.create = function create(properties) { + return new SimulatedResource(properties); + }; + + /** + * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); + if (message.resourceData != null && Object.hasOwnProperty.call(message, "resourceData")) + $root.google.protobuf.Struct.encode(message.resourceData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.iamPolicyData != null && Object.hasOwnProperty.call(message, "iamPolicyData")) + $root.google.iam.v1.Policy.encode(message.iamPolicyData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulatedResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.string(); + break; + } + case 2: { + message.resourceData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.iamPolicyData = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulatedResource message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulatedResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resourceData != null && message.hasOwnProperty("resourceData")) { + var error = $root.google.protobuf.Struct.verify(message.resourceData); + if (error) + return "resourceData." + error; + } + if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) { + var error = $root.google.iam.v1.Policy.verify(message.iamPolicyData); + if (error) + return "iamPolicyData." + error; + } + return null; + }; + + /** + * Creates a SimulatedResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource + */ + SimulatedResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resourceData != null) { + if (typeof object.resourceData !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.resourceData: object expected"); + message.resourceData = $root.google.protobuf.Struct.fromObject(object.resourceData); + } + if (object.iamPolicyData != null) { + if (typeof object.iamPolicyData !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.iamPolicyData: object expected"); + message.iamPolicyData = $root.google.iam.v1.Policy.fromObject(object.iamPolicyData); + } + return message; + }; + + /** + * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} message SimulatedResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulatedResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = ""; + object.resourceData = null; + object.iamPolicyData = null; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resourceData != null && message.hasOwnProperty("resourceData")) + object.resourceData = $root.google.protobuf.Struct.toObject(message.resourceData, options); + if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) + object.iamPolicyData = $root.google.iam.v1.Policy.toObject(message.iamPolicyData, options); + return object; + }; + + /** + * Converts this SimulatedResource to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @instance + * @returns {Object.} JSON object + */ + SimulatedResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimulatedResource + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimulatedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource"; + }; + + return SimulatedResource; + })(); + + return SimulateSecurityHealthAnalyticsCustomModuleRequest; + })(); + + v1.SimulatedFinding = (function() { + + /** + * Properties of a SimulatedFinding. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ISimulatedFinding + * @property {string|null} [name] SimulatedFinding name + * @property {string|null} [parent] SimulatedFinding parent + * @property {string|null} [resourceName] SimulatedFinding resourceName + * @property {string|null} [category] SimulatedFinding category + * @property {google.cloud.securitycentermanagement.v1.SimulatedFinding.State|null} [state] SimulatedFinding state + * @property {Object.|null} [sourceProperties] SimulatedFinding sourceProperties + * @property {google.protobuf.ITimestamp|null} [eventTime] SimulatedFinding eventTime + * @property {google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|null} [severity] SimulatedFinding severity + * @property {google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|null} [findingClass] SimulatedFinding findingClass + */ + + /** + * Constructs a new SimulatedFinding. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a SimulatedFinding. + * @implements ISimulatedFinding + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding=} [properties] Properties to set + */ + function SimulatedFinding(properties) { + this.sourceProperties = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulatedFinding name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.name = ""; + + /** + * SimulatedFinding parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.parent = ""; + + /** + * SimulatedFinding resourceName. + * @member {string} resourceName + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.resourceName = ""; + + /** + * SimulatedFinding category. + * @member {string} category + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.category = ""; + + /** + * SimulatedFinding state. + * @member {google.cloud.securitycentermanagement.v1.SimulatedFinding.State} state + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.state = 0; + + /** + * SimulatedFinding sourceProperties. + * @member {Object.} sourceProperties + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.sourceProperties = $util.emptyObject; + + /** + * SimulatedFinding eventTime. + * @member {google.protobuf.ITimestamp|null|undefined} eventTime + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.eventTime = null; + + /** + * SimulatedFinding severity. + * @member {google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity} severity + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.severity = 0; + + /** + * SimulatedFinding findingClass. + * @member {google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass} findingClass + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + */ + SimulatedFinding.prototype.findingClass = 0; + + /** + * Creates a new SimulatedFinding instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding instance + */ + SimulatedFinding.create = function create(properties) { + return new SimulatedFinding(properties); + }; + + /** + * Encodes the specified SimulatedFinding message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding} message SimulatedFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedFinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.category); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.sourceProperties != null && Object.hasOwnProperty.call(message, "sourceProperties")) + for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) + $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.severity); + if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.findingClass); + return writer; + }; + + /** + * Encodes the specified SimulatedFinding message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding} message SimulatedFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedFinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulatedFinding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedFinding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulatedFinding(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + case 3: { + message.resourceName = reader.string(); + break; + } + case 4: { + message.category = reader.string(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + if (message.sourceProperties === $util.emptyObject) + message.sourceProperties = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.sourceProperties[key] = value; + break; + } + case 7: { + message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.severity = reader.int32(); + break; + } + case 9: { + message.findingClass = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulatedFinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedFinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulatedFinding message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulatedFinding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isString(message.category)) + return "category: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { + if (!$util.isObject(message.sourceProperties)) + return "sourceProperties: object expected"; + var key = Object.keys(message.sourceProperties); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); + if (error) + return "sourceProperties." + error; + } + } + if (message.eventTime != null && message.hasOwnProperty("eventTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.eventTime); + if (error) + return "eventTime." + error; + } + if (message.severity != null && message.hasOwnProperty("severity")) + switch (message.severity) { + default: + return "severity: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + switch (message.findingClass) { + default: + return "findingClass: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a SimulatedFinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding + */ + SimulatedFinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulatedFinding) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SimulatedFinding(); + if (object.name != null) + message.name = String(object.name); + if (object.parent != null) + message.parent = String(object.parent); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.category != null) + message.category = String(object.category); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "INACTIVE": + case 2: + message.state = 2; + break; + } + if (object.sourceProperties) { + if (typeof object.sourceProperties !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulatedFinding.sourceProperties: object expected"); + message.sourceProperties = {}; + for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { + if (typeof object.sourceProperties[keys[i]] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulatedFinding.sourceProperties: object expected"); + message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); + } + } + if (object.eventTime != null) { + if (typeof object.eventTime !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulatedFinding.eventTime: object expected"); + message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); + } + switch (object.severity) { + default: + if (typeof object.severity === "number") { + message.severity = object.severity; + break; + } + break; + case "SEVERITY_UNSPECIFIED": + case 0: + message.severity = 0; + break; + case "CRITICAL": + case 1: + message.severity = 1; + break; + case "HIGH": + case 2: + message.severity = 2; + break; + case "MEDIUM": + case 3: + message.severity = 3; + break; + case "LOW": + case 4: + message.severity = 4; + break; + } + switch (object.findingClass) { + default: + if (typeof object.findingClass === "number") { + message.findingClass = object.findingClass; + break; + } + break; + case "FINDING_CLASS_UNSPECIFIED": + case 0: + message.findingClass = 0; + break; + case "THREAT": + case 1: + message.findingClass = 1; + break; + case "VULNERABILITY": + case 2: + message.findingClass = 2; + break; + case "MISCONFIGURATION": + case 3: + message.findingClass = 3; + break; + case "OBSERVATION": + case 4: + message.findingClass = 4; + break; + case "SCC_ERROR": + case 5: + message.findingClass = 5; + break; + case "POSTURE_VIOLATION": + case 6: + message.findingClass = 6; + break; + case "TOXIC_COMBINATION": + case 7: + message.findingClass = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a SimulatedFinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulatedFinding} message SimulatedFinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulatedFinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.sourceProperties = {}; + if (options.defaults) { + object.name = ""; + object.parent = ""; + object.resourceName = ""; + object.category = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.eventTime = null; + object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; + object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.State[message.state] : message.state; + var keys2; + if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { + object.sourceProperties = {}; + for (var j = 0; j < keys2.length; ++j) + object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); + } + if (message.eventTime != null && message.hasOwnProperty("eventTime")) + object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); + if (message.severity != null && message.hasOwnProperty("severity")) + object.severity = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity[message.severity] : message.severity; + if (message.findingClass != null && message.hasOwnProperty("findingClass")) + object.findingClass = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass[message.findingClass] : message.findingClass; + return object; + }; + + /** + * Converts this SimulatedFinding to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @instance + * @returns {Object.} JSON object + */ + SimulatedFinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimulatedFinding + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimulatedFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulatedFinding"; + }; + + /** + * State enum. + * @name google.cloud.securitycentermanagement.v1.SimulatedFinding.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} INACTIVE=2 INACTIVE value + */ + SimulatedFinding.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "INACTIVE"] = 2; + return values; + })(); + + /** + * Severity enum. + * @name google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity + * @enum {number} + * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value + * @property {number} CRITICAL=1 CRITICAL value + * @property {number} HIGH=2 HIGH value + * @property {number} MEDIUM=3 MEDIUM value + * @property {number} LOW=4 LOW value + */ + SimulatedFinding.Severity = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CRITICAL"] = 1; + values[valuesById[2] = "HIGH"] = 2; + values[valuesById[3] = "MEDIUM"] = 3; + values[valuesById[4] = "LOW"] = 4; + return values; + })(); + + /** + * FindingClass enum. + * @name google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass + * @enum {number} + * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value + * @property {number} THREAT=1 THREAT value + * @property {number} VULNERABILITY=2 VULNERABILITY value + * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value + * @property {number} OBSERVATION=4 OBSERVATION value + * @property {number} SCC_ERROR=5 SCC_ERROR value + * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value + * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value + */ + SimulatedFinding.FindingClass = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; + values[valuesById[1] = "THREAT"] = 1; + values[valuesById[2] = "VULNERABILITY"] = 2; + values[valuesById[3] = "MISCONFIGURATION"] = 3; + values[valuesById[4] = "OBSERVATION"] = 4; + values[valuesById[5] = "SCC_ERROR"] = 5; + values[valuesById[6] = "POSTURE_VIOLATION"] = 6; + values[valuesById[7] = "TOXIC_COMBINATION"] = 7; + return values; + })(); + + return SimulatedFinding; + })(); + + v1.SimulateSecurityHealthAnalyticsCustomModuleResponse = (function() { + + /** + * Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ISimulateSecurityHealthAnalyticsCustomModuleResponse + * @property {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null} [result] SimulateSecurityHealthAnalyticsCustomModuleResponse result + */ + + /** + * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. + * @implements ISimulateSecurityHealthAnalyticsCustomModuleResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set + */ + function SimulateSecurityHealthAnalyticsCustomModuleResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulateSecurityHealthAnalyticsCustomModuleResponse result. + * @member {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null|undefined} result + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @instance + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.result = null; + + /** + * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse instance + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.create = function create(properties) { + return new SimulateSecurityHealthAnalyticsCustomModuleResponse(properties); + }; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.result: object expected"); + message.result = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.toObject(message.result, options); + return object; + }; + + /** + * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @instance + * @returns {Object.} JSON object + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimulateSecurityHealthAnalyticsCustomModuleResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse"; + }; + + SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult = (function() { + + /** + * Properties of a SimulatedResult. + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @interface ISimulatedResult + * @property {google.cloud.securitycentermanagement.v1.ISimulatedFinding|null} [finding] SimulatedResult finding + * @property {google.protobuf.IEmpty|null} [noViolation] SimulatedResult noViolation + * @property {google.rpc.IStatus|null} [error] SimulatedResult error + */ + + /** + * Constructs a new SimulatedResult. + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse + * @classdesc Represents a SimulatedResult. + * @implements ISimulatedResult + * @constructor + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set + */ + function SimulatedResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulatedResult finding. + * @member {google.cloud.securitycentermanagement.v1.ISimulatedFinding|null|undefined} finding + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + SimulatedResult.prototype.finding = null; + + /** + * SimulatedResult noViolation. + * @member {google.protobuf.IEmpty|null|undefined} noViolation + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + SimulatedResult.prototype.noViolation = null; + + /** + * SimulatedResult error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + SimulatedResult.prototype.error = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SimulatedResult result. + * @member {"finding"|"noViolation"|"error"|undefined} result + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + */ + Object.defineProperty(SimulatedResult.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["finding", "noViolation", "error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SimulatedResult instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult instance + */ + SimulatedResult.create = function create(properties) { + return new SimulatedResult(properties); + }; + + /** + * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) + $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.noViolation != null && Object.hasOwnProperty.call(message, "noViolation")) + $root.google.protobuf.Empty.encode(message.noViolation, 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(); + return writer; + }; + + /** + * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulatedResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulatedResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.finding = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.noViolation = $root.google.protobuf.Empty.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulatedResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulatedResult message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulatedResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.finding != null && message.hasOwnProperty("finding")) { + properties.result = 1; + { + var error = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.verify(message.finding); + if (error) + return "finding." + error; + } + } + if (message.noViolation != null && message.hasOwnProperty("noViolation")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Empty.verify(message.noViolation); + if (error) + return "noViolation." + error; + } + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + return null; + }; + + /** + * Creates a SimulatedResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult + */ + SimulatedResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); + if (object.finding != null) { + if (typeof object.finding !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.finding: object expected"); + message.finding = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.fromObject(object.finding); + } + if (object.noViolation != null) { + if (typeof object.noViolation !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.noViolation: object expected"); + message.noViolation = $root.google.protobuf.Empty.fromObject(object.noViolation); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + return message; + }; + + /** + * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} message SimulatedResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulatedResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.finding != null && message.hasOwnProperty("finding")) { + object.finding = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.toObject(message.finding, options); + if (options.oneofs) + object.result = "finding"; + } + if (message.noViolation != null && message.hasOwnProperty("noViolation")) { + object.noViolation = $root.google.protobuf.Empty.toObject(message.noViolation, options); + if (options.oneofs) + object.result = "noViolation"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + return object; + }; + + /** + * Converts this SimulatedResult to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @instance + * @returns {Object.} JSON object + */ + SimulatedResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SimulatedResult + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SimulatedResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult"; + }; + + return SimulatedResult; + })(); + + return SimulateSecurityHealthAnalyticsCustomModuleResponse; + })(); + + v1.EffectiveEventThreatDetectionCustomModule = (function() { + + /** + * Properties of an EffectiveEventThreatDetectionCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IEffectiveEventThreatDetectionCustomModule + * @property {string|null} [name] EffectiveEventThreatDetectionCustomModule name + * @property {google.protobuf.IStruct|null} [config] EffectiveEventThreatDetectionCustomModule config + * @property {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|null} [enablementState] EffectiveEventThreatDetectionCustomModule enablementState + * @property {string|null} [type] EffectiveEventThreatDetectionCustomModule type + * @property {string|null} [displayName] EffectiveEventThreatDetectionCustomModule displayName + * @property {string|null} [description] EffectiveEventThreatDetectionCustomModule description + */ + + /** + * Constructs a new EffectiveEventThreatDetectionCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents an EffectiveEventThreatDetectionCustomModule. + * @implements IEffectiveEventThreatDetectionCustomModule + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule=} [properties] Properties to set + */ + function EffectiveEventThreatDetectionCustomModule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EffectiveEventThreatDetectionCustomModule name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @instance + */ + EffectiveEventThreatDetectionCustomModule.prototype.name = ""; + + /** + * EffectiveEventThreatDetectionCustomModule config. + * @member {google.protobuf.IStruct|null|undefined} config + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @instance + */ + EffectiveEventThreatDetectionCustomModule.prototype.config = null; + + /** + * EffectiveEventThreatDetectionCustomModule enablementState. + * @member {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @instance + */ + EffectiveEventThreatDetectionCustomModule.prototype.enablementState = 0; + + /** + * EffectiveEventThreatDetectionCustomModule type. + * @member {string} type + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @instance + */ + EffectiveEventThreatDetectionCustomModule.prototype.type = ""; + + /** + * EffectiveEventThreatDetectionCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @instance + */ + EffectiveEventThreatDetectionCustomModule.prototype.displayName = ""; + + /** + * EffectiveEventThreatDetectionCustomModule description. + * @member {string} description + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @instance + */ + EffectiveEventThreatDetectionCustomModule.prototype.description = ""; + + /** + * Creates a new EffectiveEventThreatDetectionCustomModule instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule instance + */ + EffectiveEventThreatDetectionCustomModule.create = function create(properties) { + return new EffectiveEventThreatDetectionCustomModule(properties); + }; + + /** + * Encodes the specified EffectiveEventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EffectiveEventThreatDetectionCustomModule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.protobuf.Struct.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + return writer; + }; + + /** + * Encodes the specified EffectiveEventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EffectiveEventThreatDetectionCustomModule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EffectiveEventThreatDetectionCustomModule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.enablementState = reader.int32(); + break; + } + case 4: { + message.type = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EffectiveEventThreatDetectionCustomModule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EffectiveEventThreatDetectionCustomModule message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EffectiveEventThreatDetectionCustomModule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.protobuf.Struct.verify(message.config); + if (error) + return "config." + error; + } + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an EffectiveEventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule + */ + EffectiveEventThreatDetectionCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.config: object expected"); + message.config = $root.google.protobuf.Struct.fromObject(object.config); + } + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "ENABLED": + case 1: + message.enablementState = 1; + break; + case "DISABLED": + case 2: + message.enablementState = 2; + break; + } + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an EffectiveEventThreatDetectionCustomModule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EffectiveEventThreatDetectionCustomModule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.type = ""; + object.displayName = ""; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.protobuf.Struct.toObject(message.config, options); + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this EffectiveEventThreatDetectionCustomModule to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @instance + * @returns {Object.} JSON object + */ + EffectiveEventThreatDetectionCustomModule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EffectiveEventThreatDetectionCustomModule + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EffectiveEventThreatDetectionCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule"; + }; + + /** + * EnablementState enum. + * @name google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + EffectiveEventThreatDetectionCustomModule.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + return EffectiveEventThreatDetectionCustomModule; + })(); + + v1.ListEffectiveEventThreatDetectionCustomModulesRequest = (function() { + + /** + * Properties of a ListEffectiveEventThreatDetectionCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListEffectiveEventThreatDetectionCustomModulesRequest + * @property {string|null} [parent] ListEffectiveEventThreatDetectionCustomModulesRequest parent + * @property {number|null} [pageSize] ListEffectiveEventThreatDetectionCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListEffectiveEventThreatDetectionCustomModulesRequest pageToken + */ + + /** + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListEffectiveEventThreatDetectionCustomModulesRequest. + * @implements IListEffectiveEventThreatDetectionCustomModulesRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + */ + function ListEffectiveEventThreatDetectionCustomModulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEffectiveEventThreatDetectionCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @instance + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.parent = ""; + + /** + * ListEffectiveEventThreatDetectionCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @instance + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; + + /** + * ListEffectiveEventThreatDetectionCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @instance + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEffectiveEventThreatDetectionCustomModulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest instance + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.create = function create(properties) { + return new ListEffectiveEventThreatDetectionCustomModulesRequest(properties); + }; + + /** + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEffectiveEventThreatDetectionCustomModulesRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListEffectiveEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListEffectiveEventThreatDetectionCustomModulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEffectiveEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest"; + }; + + return ListEffectiveEventThreatDetectionCustomModulesRequest; + })(); + + v1.ListEffectiveEventThreatDetectionCustomModulesResponse = (function() { + + /** + * Properties of a ListEffectiveEventThreatDetectionCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListEffectiveEventThreatDetectionCustomModulesResponse + * @property {Array.|null} [effectiveEventThreatDetectionCustomModules] ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules + * @property {string|null} [nextPageToken] ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken + */ + + /** + * Constructs a new ListEffectiveEventThreatDetectionCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListEffectiveEventThreatDetectionCustomModulesResponse. + * @implements IListEffectiveEventThreatDetectionCustomModulesResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + */ + function ListEffectiveEventThreatDetectionCustomModulesResponse(properties) { + this.effectiveEventThreatDetectionCustomModules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules. + * @member {Array.} effectiveEventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @instance + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.effectiveEventThreatDetectionCustomModules = $util.emptyArray; + + /** + * ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @instance + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEffectiveEventThreatDetectionCustomModulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse instance + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.create = function create(properties) { + return new ListEffectiveEventThreatDetectionCustomModulesResponse(properties); + }; + + /** + * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.effectiveEventThreatDetectionCustomModules != null && message.effectiveEventThreatDetectionCustomModules.length) + for (var i = 0; i < message.effectiveEventThreatDetectionCustomModules.length; ++i) + $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.encode(message.effectiveEventThreatDetectionCustomModules[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 ListEffectiveEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.effectiveEventThreatDetectionCustomModules && message.effectiveEventThreatDetectionCustomModules.length)) + message.effectiveEventThreatDetectionCustomModules = []; + message.effectiveEventThreatDetectionCustomModules.push($root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEffectiveEventThreatDetectionCustomModulesResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.effectiveEventThreatDetectionCustomModules != null && message.hasOwnProperty("effectiveEventThreatDetectionCustomModules")) { + if (!Array.isArray(message.effectiveEventThreatDetectionCustomModules)) + return "effectiveEventThreatDetectionCustomModules: array expected"; + for (var i = 0; i < message.effectiveEventThreatDetectionCustomModules.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify(message.effectiveEventThreatDetectionCustomModules[i]); + if (error) + return "effectiveEventThreatDetectionCustomModules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEffectiveEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse(); + if (object.effectiveEventThreatDetectionCustomModules) { + if (!Array.isArray(object.effectiveEventThreatDetectionCustomModules)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.effectiveEventThreatDetectionCustomModules: array expected"); + message.effectiveEventThreatDetectionCustomModules = []; + for (var i = 0; i < object.effectiveEventThreatDetectionCustomModules.length; ++i) { + if (typeof object.effectiveEventThreatDetectionCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.effectiveEventThreatDetectionCustomModules: object expected"); + message.effectiveEventThreatDetectionCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.fromObject(object.effectiveEventThreatDetectionCustomModules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.effectiveEventThreatDetectionCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.effectiveEventThreatDetectionCustomModules && message.effectiveEventThreatDetectionCustomModules.length) { + object.effectiveEventThreatDetectionCustomModules = []; + for (var j = 0; j < message.effectiveEventThreatDetectionCustomModules.length; ++j) + object.effectiveEventThreatDetectionCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.toObject(message.effectiveEventThreatDetectionCustomModules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEffectiveEventThreatDetectionCustomModulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEffectiveEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse"; + }; + + return ListEffectiveEventThreatDetectionCustomModulesResponse; + })(); + + v1.GetEffectiveEventThreatDetectionCustomModuleRequest = (function() { + + /** + * Properties of a GetEffectiveEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IGetEffectiveEventThreatDetectionCustomModuleRequest + * @property {string|null} [name] GetEffectiveEventThreatDetectionCustomModuleRequest name + */ + + /** + * Constructs a new GetEffectiveEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a GetEffectiveEventThreatDetectionCustomModuleRequest. + * @implements IGetEffectiveEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function GetEffectiveEventThreatDetectionCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEffectiveEventThreatDetectionCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @instance + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.prototype.name = ""; + + /** + * Creates a new GetEffectiveEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest instance + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new GetEffectiveEventThreatDetectionCustomModuleRequest(properties); + }; + + /** + * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { + 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 GetEffectiveEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest(); + 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 GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEffectiveEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.verify = function verify(message) { + if (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 GetEffectiveEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEffectiveEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.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 GetEffectiveEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEffectiveEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEffectiveEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest"; + }; + + return GetEffectiveEventThreatDetectionCustomModuleRequest; + })(); + + v1.EventThreatDetectionCustomModule = (function() { + + /** + * Properties of an EventThreatDetectionCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IEventThreatDetectionCustomModule + * @property {string|null} [name] EventThreatDetectionCustomModule name + * @property {google.protobuf.IStruct|null} [config] EventThreatDetectionCustomModule config + * @property {string|null} [ancestorModule] EventThreatDetectionCustomModule ancestorModule + * @property {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|null} [enablementState] EventThreatDetectionCustomModule enablementState + * @property {string|null} [type] EventThreatDetectionCustomModule type + * @property {string|null} [displayName] EventThreatDetectionCustomModule displayName + * @property {string|null} [description] EventThreatDetectionCustomModule description + * @property {google.protobuf.ITimestamp|null} [updateTime] EventThreatDetectionCustomModule updateTime + * @property {string|null} [lastEditor] EventThreatDetectionCustomModule lastEditor + */ + + /** + * Constructs a new EventThreatDetectionCustomModule. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents an EventThreatDetectionCustomModule. + * @implements IEventThreatDetectionCustomModule + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule=} [properties] Properties to set + */ + function EventThreatDetectionCustomModule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventThreatDetectionCustomModule name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.name = ""; + + /** + * EventThreatDetectionCustomModule config. + * @member {google.protobuf.IStruct|null|undefined} config + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.config = null; + + /** + * EventThreatDetectionCustomModule ancestorModule. + * @member {string} ancestorModule + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.ancestorModule = ""; + + /** + * EventThreatDetectionCustomModule enablementState. + * @member {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState} enablementState + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.enablementState = 0; + + /** + * EventThreatDetectionCustomModule type. + * @member {string} type + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.type = ""; + + /** + * EventThreatDetectionCustomModule displayName. + * @member {string} displayName + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.displayName = ""; + + /** + * EventThreatDetectionCustomModule description. + * @member {string} description + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.description = ""; + + /** + * EventThreatDetectionCustomModule updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.updateTime = null; + + /** + * EventThreatDetectionCustomModule lastEditor. + * @member {string} lastEditor + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + */ + EventThreatDetectionCustomModule.prototype.lastEditor = ""; + + /** + * Creates a new EventThreatDetectionCustomModule instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule instance + */ + EventThreatDetectionCustomModule.create = function create(properties) { + return new EventThreatDetectionCustomModule(properties); + }; + + /** + * Encodes the specified EventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule} message EventThreatDetectionCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventThreatDetectionCustomModule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.protobuf.Struct.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ancestorModule != null && Object.hasOwnProperty.call(message, "ancestorModule")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorModule); + if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.enablementState); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lastEditor != null && Object.hasOwnProperty.call(message, "lastEditor")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.lastEditor); + return writer; + }; + + /** + * Encodes the specified EventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule} message EventThreatDetectionCustomModule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventThreatDetectionCustomModule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventThreatDetectionCustomModule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ancestorModule = reader.string(); + break; + } + case 4: { + message.enablementState = reader.int32(); + break; + } + case 5: { + message.type = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.lastEditor = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventThreatDetectionCustomModule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventThreatDetectionCustomModule message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventThreatDetectionCustomModule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.protobuf.Struct.verify(message.config); + if (error) + return "config." + error; + } + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + if (!$util.isString(message.ancestorModule)) + return "ancestorModule: string expected"; + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + switch (message.enablementState) { + default: + return "enablementState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + if (!$util.isString(message.lastEditor)) + return "lastEditor: string expected"; + return null; + }; + + /** + * Creates an EventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule + */ + EventThreatDetectionCustomModule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.config: object expected"); + message.config = $root.google.protobuf.Struct.fromObject(object.config); + } + if (object.ancestorModule != null) + message.ancestorModule = String(object.ancestorModule); + switch (object.enablementState) { + default: + if (typeof object.enablementState === "number") { + message.enablementState = object.enablementState; + break; + } + break; + case "ENABLEMENT_STATE_UNSPECIFIED": + case 0: + message.enablementState = 0; + break; + case "ENABLED": + case 1: + message.enablementState = 1; + break; + case "DISABLED": + case 2: + message.enablementState = 2; + break; + case "INHERITED": + case 3: + message.enablementState = 3; + break; + } + if (object.type != null) + message.type = String(object.type); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastEditor != null) + message.lastEditor = String(object.lastEditor); + return message; + }; + + /** + * Creates a plain object from an EventThreatDetectionCustomModule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} message EventThreatDetectionCustomModule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventThreatDetectionCustomModule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + object.ancestorModule = ""; + object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; + object.type = ""; + object.displayName = ""; + object.description = ""; + object.updateTime = null; + object.lastEditor = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.protobuf.Struct.toObject(message.config, options); + if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) + object.ancestorModule = message.ancestorModule; + if (message.enablementState != null && message.hasOwnProperty("enablementState")) + object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState[message.enablementState] : message.enablementState; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) + object.lastEditor = message.lastEditor; + return object; + }; + + /** + * Converts this EventThreatDetectionCustomModule to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @instance + * @returns {Object.} JSON object + */ + EventThreatDetectionCustomModule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventThreatDetectionCustomModule + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventThreatDetectionCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule"; + }; + + /** + * EnablementState enum. + * @name google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState + * @enum {number} + * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} INHERITED=3 INHERITED value + */ + EventThreatDetectionCustomModule.EnablementState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "INHERITED"] = 3; + return values; + })(); + + return EventThreatDetectionCustomModule; + })(); + + v1.ListEventThreatDetectionCustomModulesRequest = (function() { + + /** + * Properties of a ListEventThreatDetectionCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListEventThreatDetectionCustomModulesRequest + * @property {string|null} [parent] ListEventThreatDetectionCustomModulesRequest parent + * @property {number|null} [pageSize] ListEventThreatDetectionCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListEventThreatDetectionCustomModulesRequest pageToken + */ + + /** + * Constructs a new ListEventThreatDetectionCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListEventThreatDetectionCustomModulesRequest. + * @implements IListEventThreatDetectionCustomModulesRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + */ + function ListEventThreatDetectionCustomModulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEventThreatDetectionCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @instance + */ + ListEventThreatDetectionCustomModulesRequest.prototype.parent = ""; + + /** + * ListEventThreatDetectionCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @instance + */ + ListEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; + + /** + * ListEventThreatDetectionCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @instance + */ + ListEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEventThreatDetectionCustomModulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest instance + */ + ListEventThreatDetectionCustomModulesRequest.create = function create(properties) { + return new ListEventThreatDetectionCustomModulesRequest(properties); + }; + + /** + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventThreatDetectionCustomModulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEventThreatDetectionCustomModulesRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEventThreatDetectionCustomModulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest + */ + ListEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListEventThreatDetectionCustomModulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEventThreatDetectionCustomModulesRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest"; + }; + + return ListEventThreatDetectionCustomModulesRequest; + })(); + + v1.ListEventThreatDetectionCustomModulesResponse = (function() { + + /** + * Properties of a ListEventThreatDetectionCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListEventThreatDetectionCustomModulesResponse + * @property {Array.|null} [eventThreatDetectionCustomModules] ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules + * @property {string|null} [nextPageToken] ListEventThreatDetectionCustomModulesResponse nextPageToken + */ + + /** + * Constructs a new ListEventThreatDetectionCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListEventThreatDetectionCustomModulesResponse. + * @implements IListEventThreatDetectionCustomModulesResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + */ + function ListEventThreatDetectionCustomModulesResponse(properties) { + this.eventThreatDetectionCustomModules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. + * @member {Array.} eventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @instance + */ + ListEventThreatDetectionCustomModulesResponse.prototype.eventThreatDetectionCustomModules = $util.emptyArray; + + /** + * ListEventThreatDetectionCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @instance + */ + ListEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEventThreatDetectionCustomModulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse instance + */ + ListEventThreatDetectionCustomModulesResponse.create = function create(properties) { + return new ListEventThreatDetectionCustomModulesResponse(properties); + }; + + /** + * Encodes the specified ListEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventThreatDetectionCustomModules != null && message.eventThreatDetectionCustomModules.length) + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) + $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModules[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 ListEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventThreatDetectionCustomModulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length)) + message.eventThreatDetectionCustomModules = []; + message.eventThreatDetectionCustomModules.push($root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEventThreatDetectionCustomModulesResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEventThreatDetectionCustomModulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventThreatDetectionCustomModules != null && message.hasOwnProperty("eventThreatDetectionCustomModules")) { + if (!Array.isArray(message.eventThreatDetectionCustomModules)) + return "eventThreatDetectionCustomModules: array expected"; + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModules[i]); + if (error) + return "eventThreatDetectionCustomModules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse + */ + ListEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse(); + if (object.eventThreatDetectionCustomModules) { + if (!Array.isArray(object.eventThreatDetectionCustomModules)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: array expected"); + message.eventThreatDetectionCustomModules = []; + for (var i = 0; i < object.eventThreatDetectionCustomModules.length; ++i) { + if (typeof object.eventThreatDetectionCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: object expected"); + message.eventThreatDetectionCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.eventThreatDetectionCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length) { + object.eventThreatDetectionCustomModules = []; + for (var j = 0; j < message.eventThreatDetectionCustomModules.length; ++j) + object.eventThreatDetectionCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEventThreatDetectionCustomModulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEventThreatDetectionCustomModulesResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse"; + }; + + return ListEventThreatDetectionCustomModulesResponse; + })(); + + v1.ListDescendantEventThreatDetectionCustomModulesRequest = (function() { + + /** + * Properties of a ListDescendantEventThreatDetectionCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListDescendantEventThreatDetectionCustomModulesRequest + * @property {string|null} [parent] ListDescendantEventThreatDetectionCustomModulesRequest parent + * @property {number|null} [pageSize] ListDescendantEventThreatDetectionCustomModulesRequest pageSize + * @property {string|null} [pageToken] ListDescendantEventThreatDetectionCustomModulesRequest pageToken + */ + + /** + * Constructs a new ListDescendantEventThreatDetectionCustomModulesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListDescendantEventThreatDetectionCustomModulesRequest. + * @implements IListDescendantEventThreatDetectionCustomModulesRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + */ + function ListDescendantEventThreatDetectionCustomModulesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDescendantEventThreatDetectionCustomModulesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @instance + */ + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.parent = ""; + + /** + * ListDescendantEventThreatDetectionCustomModulesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @instance + */ + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; + + /** + * ListDescendantEventThreatDetectionCustomModulesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @instance + */ + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDescendantEventThreatDetectionCustomModulesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest instance + */ + ListDescendantEventThreatDetectionCustomModulesRequest.create = function create(properties) { + return new ListDescendantEventThreatDetectionCustomModulesRequest(properties); + }; + + /** + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantEventThreatDetectionCustomModulesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDescendantEventThreatDetectionCustomModulesRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDescendantEventThreatDetectionCustomModulesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDescendantEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest + */ + ListDescendantEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDescendantEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDescendantEventThreatDetectionCustomModulesRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDescendantEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDescendantEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest"; + }; + + return ListDescendantEventThreatDetectionCustomModulesRequest; + })(); + + v1.ListDescendantEventThreatDetectionCustomModulesResponse = (function() { + + /** + * Properties of a ListDescendantEventThreatDetectionCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListDescendantEventThreatDetectionCustomModulesResponse + * @property {Array.|null} [eventThreatDetectionCustomModules] ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules + * @property {string|null} [nextPageToken] ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken + */ + + /** + * Constructs a new ListDescendantEventThreatDetectionCustomModulesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListDescendantEventThreatDetectionCustomModulesResponse. + * @implements IListDescendantEventThreatDetectionCustomModulesResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + */ + function ListDescendantEventThreatDetectionCustomModulesResponse(properties) { + this.eventThreatDetectionCustomModules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. + * @member {Array.} eventThreatDetectionCustomModules + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @instance + */ + ListDescendantEventThreatDetectionCustomModulesResponse.prototype.eventThreatDetectionCustomModules = $util.emptyArray; + + /** + * ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @instance + */ + ListDescendantEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDescendantEventThreatDetectionCustomModulesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse instance + */ + ListDescendantEventThreatDetectionCustomModulesResponse.create = function create(properties) { + return new ListDescendantEventThreatDetectionCustomModulesResponse(properties); + }; + + /** + * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventThreatDetectionCustomModules != null && message.eventThreatDetectionCustomModules.length) + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) + $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModules[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 ListDescendantEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDescendantEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantEventThreatDetectionCustomModulesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length)) + message.eventThreatDetectionCustomModules = []; + message.eventThreatDetectionCustomModules.push($root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDescendantEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDescendantEventThreatDetectionCustomModulesResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDescendantEventThreatDetectionCustomModulesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventThreatDetectionCustomModules != null && message.hasOwnProperty("eventThreatDetectionCustomModules")) { + if (!Array.isArray(message.eventThreatDetectionCustomModules)) + return "eventThreatDetectionCustomModules: array expected"; + for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModules[i]); + if (error) + return "eventThreatDetectionCustomModules." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDescendantEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse + */ + ListDescendantEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse(); + if (object.eventThreatDetectionCustomModules) { + if (!Array.isArray(object.eventThreatDetectionCustomModules)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: array expected"); + message.eventThreatDetectionCustomModules = []; + for (var i = 0; i < object.eventThreatDetectionCustomModules.length; ++i) { + if (typeof object.eventThreatDetectionCustomModules[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: object expected"); + message.eventThreatDetectionCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModules[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDescendantEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.eventThreatDetectionCustomModules = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length) { + object.eventThreatDetectionCustomModules = []; + for (var j = 0; j < message.eventThreatDetectionCustomModules.length; ++j) + object.eventThreatDetectionCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModules[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDescendantEventThreatDetectionCustomModulesResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDescendantEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDescendantEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse"; + }; + + return ListDescendantEventThreatDetectionCustomModulesResponse; + })(); + + v1.GetEventThreatDetectionCustomModuleRequest = (function() { + + /** + * Properties of a GetEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IGetEventThreatDetectionCustomModuleRequest + * @property {string|null} [name] GetEventThreatDetectionCustomModuleRequest name + */ + + /** + * Constructs a new GetEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a GetEventThreatDetectionCustomModuleRequest. + * @implements IGetEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function GetEventThreatDetectionCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEventThreatDetectionCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @instance + */ + GetEventThreatDetectionCustomModuleRequest.prototype.name = ""; + + /** + * Creates a new GetEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest instance + */ + GetEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new GetEventThreatDetectionCustomModuleRequest(properties); + }; + + /** + * Encodes the specified GetEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { + 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 GetEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest(); + 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 GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEventThreatDetectionCustomModuleRequest.verify = function verify(message) { + if (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 GetEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest + */ + GetEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEventThreatDetectionCustomModuleRequest.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 GetEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + GetEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest"; + }; + + return GetEventThreatDetectionCustomModuleRequest; + })(); + + v1.CreateEventThreatDetectionCustomModuleRequest = (function() { + + /** + * Properties of a CreateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface ICreateEventThreatDetectionCustomModuleRequest + * @property {string|null} [parent] CreateEventThreatDetectionCustomModuleRequest parent + * @property {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null} [eventThreatDetectionCustomModule] CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule + * @property {boolean|null} [validateOnly] CreateEventThreatDetectionCustomModuleRequest validateOnly + */ + + /** + * Constructs a new CreateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a CreateEventThreatDetectionCustomModuleRequest. + * @implements ICreateEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function CreateEventThreatDetectionCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEventThreatDetectionCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @instance + */ + CreateEventThreatDetectionCustomModuleRequest.prototype.parent = ""; + + /** + * CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. + * @member {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null|undefined} eventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @instance + */ + CreateEventThreatDetectionCustomModuleRequest.prototype.eventThreatDetectionCustomModule = null; + + /** + * CreateEventThreatDetectionCustomModuleRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @instance + */ + CreateEventThreatDetectionCustomModuleRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest instance + */ + CreateEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new CreateEventThreatDetectionCustomModuleRequest(properties); + }; + + /** + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && Object.hasOwnProperty.call(message, "eventThreatDetectionCustomModule")) + $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 3: { + message.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) { + var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModule); + if (error) + return "eventThreatDetectionCustomModule." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest + */ + CreateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.eventThreatDetectionCustomModule != null) { + if (typeof object.eventThreatDetectionCustomModule !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.eventThreatDetectionCustomModule: object expected"); + message.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModule); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.eventThreatDetectionCustomModule = null; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) + object.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModule, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest"; + }; + + return CreateEventThreatDetectionCustomModuleRequest; + })(); + + v1.UpdateEventThreatDetectionCustomModuleRequest = (function() { + + /** + * Properties of an UpdateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IUpdateEventThreatDetectionCustomModuleRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEventThreatDetectionCustomModuleRequest updateMask + * @property {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null} [eventThreatDetectionCustomModule] UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule + * @property {boolean|null} [validateOnly] UpdateEventThreatDetectionCustomModuleRequest validateOnly + */ + + /** + * Constructs a new UpdateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents an UpdateEventThreatDetectionCustomModuleRequest. + * @implements IUpdateEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function UpdateEventThreatDetectionCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEventThreatDetectionCustomModuleRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @instance + */ + UpdateEventThreatDetectionCustomModuleRequest.prototype.updateMask = null; + + /** + * UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. + * @member {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null|undefined} eventThreatDetectionCustomModule + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @instance + */ + UpdateEventThreatDetectionCustomModuleRequest.prototype.eventThreatDetectionCustomModule = null; + + /** + * UpdateEventThreatDetectionCustomModuleRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @instance + */ + UpdateEventThreatDetectionCustomModuleRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest instance + */ + UpdateEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new UpdateEventThreatDetectionCustomModuleRequest(properties); + }; + + /** + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && Object.hasOwnProperty.call(message, "eventThreatDetectionCustomModule")) + $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest(); + 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.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) { + var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModule); + if (error) + return "eventThreatDetectionCustomModule." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest + */ + UpdateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.eventThreatDetectionCustomModule != null) { + if (typeof object.eventThreatDetectionCustomModule !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.eventThreatDetectionCustomModule: object expected"); + message.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModule); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.eventThreatDetectionCustomModule = null; + object.validateOnly = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) + object.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModule, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest"; + }; + + return UpdateEventThreatDetectionCustomModuleRequest; + })(); + + v1.DeleteEventThreatDetectionCustomModuleRequest = (function() { + + /** + * Properties of a DeleteEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IDeleteEventThreatDetectionCustomModuleRequest + * @property {string|null} [name] DeleteEventThreatDetectionCustomModuleRequest name + * @property {boolean|null} [validateOnly] DeleteEventThreatDetectionCustomModuleRequest validateOnly + */ + + /** + * Constructs a new DeleteEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a DeleteEventThreatDetectionCustomModuleRequest. + * @implements IDeleteEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function DeleteEventThreatDetectionCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEventThreatDetectionCustomModuleRequest name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @instance + */ + DeleteEventThreatDetectionCustomModuleRequest.prototype.name = ""; + + /** + * DeleteEventThreatDetectionCustomModuleRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @instance + */ + DeleteEventThreatDetectionCustomModuleRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest instance + */ + DeleteEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new DeleteEventThreatDetectionCustomModuleRequest(properties); + }; + + /** + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEventThreatDetectionCustomModuleRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a DeleteEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest + */ + DeleteEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a DeleteEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.validateOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this DeleteEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest"; + }; + + return DeleteEventThreatDetectionCustomModuleRequest; + })(); + + v1.ValidateEventThreatDetectionCustomModuleRequest = (function() { + + /** + * Properties of a ValidateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IValidateEventThreatDetectionCustomModuleRequest + * @property {string|null} [parent] ValidateEventThreatDetectionCustomModuleRequest parent + * @property {string|null} [rawText] ValidateEventThreatDetectionCustomModuleRequest rawText + * @property {string|null} [type] ValidateEventThreatDetectionCustomModuleRequest type + */ + + /** + * Constructs a new ValidateEventThreatDetectionCustomModuleRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ValidateEventThreatDetectionCustomModuleRequest. + * @implements IValidateEventThreatDetectionCustomModuleRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + */ + function ValidateEventThreatDetectionCustomModuleRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidateEventThreatDetectionCustomModuleRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.parent = ""; + + /** + * ValidateEventThreatDetectionCustomModuleRequest rawText. + * @member {string} rawText + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.rawText = ""; + + /** + * ValidateEventThreatDetectionCustomModuleRequest type. + * @member {string} type + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.type = ""; + + /** + * Creates a new ValidateEventThreatDetectionCustomModuleRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest instance + */ + ValidateEventThreatDetectionCustomModuleRequest.create = function create(properties) { + return new ValidateEventThreatDetectionCustomModuleRequest(properties); + }; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateEventThreatDetectionCustomModuleRequest.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.rawText != null && Object.hasOwnProperty.call(message, "rawText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rawText); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.rawText = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidateEventThreatDetectionCustomModuleRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidateEventThreatDetectionCustomModuleRequest.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.rawText != null && message.hasOwnProperty("rawText")) + if (!$util.isString(message.rawText)) + return "rawText: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates a ValidateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest + */ + ValidateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rawText != null) + message.rawText = String(object.rawText); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.rawText = ""; + object.type = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rawText != null && message.hasOwnProperty("rawText")) + object.rawText = message.rawText; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this ValidateEventThreatDetectionCustomModuleRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @instance + * @returns {Object.} JSON object + */ + ValidateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ValidateEventThreatDetectionCustomModuleRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValidateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest"; + }; + + return ValidateEventThreatDetectionCustomModuleRequest; + })(); + + v1.ValidateEventThreatDetectionCustomModuleResponse = (function() { + + /** + * Properties of a ValidateEventThreatDetectionCustomModuleResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IValidateEventThreatDetectionCustomModuleResponse + * @property {Array.|null} [errors] ValidateEventThreatDetectionCustomModuleResponse errors + */ + + /** + * Constructs a new ValidateEventThreatDetectionCustomModuleResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ValidateEventThreatDetectionCustomModuleResponse. + * @implements IValidateEventThreatDetectionCustomModuleResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse=} [properties] Properties to set + */ + function ValidateEventThreatDetectionCustomModuleResponse(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidateEventThreatDetectionCustomModuleResponse errors. + * @member {Array.} errors + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @instance + */ + ValidateEventThreatDetectionCustomModuleResponse.prototype.errors = $util.emptyArray; + + /** + * Creates a new ValidateEventThreatDetectionCustomModuleResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse instance + */ + ValidateEventThreatDetectionCustomModuleResponse.create = function create(properties) { + return new ValidateEventThreatDetectionCustomModuleResponse(properties); + }; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateEventThreatDetectionCustomModuleResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidateEventThreatDetectionCustomModuleResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateEventThreatDetectionCustomModuleResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidateEventThreatDetectionCustomModuleResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidateEventThreatDetectionCustomModuleResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidateEventThreatDetectionCustomModuleResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + /** + * Creates a ValidateEventThreatDetectionCustomModuleResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse + */ + ValidateEventThreatDetectionCustomModuleResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse(); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.errors: object expected"); + message.errors[i] = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.fromObject(object.errors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidateEventThreatDetectionCustomModuleResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidateEventThreatDetectionCustomModuleResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.toObject(message.errors[j], options); + } + return object; + }; + + /** + * Converts this ValidateEventThreatDetectionCustomModuleResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @instance + * @returns {Object.} JSON object + */ + ValidateEventThreatDetectionCustomModuleResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ValidateEventThreatDetectionCustomModuleResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValidateEventThreatDetectionCustomModuleResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse"; + }; + + ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError = (function() { + + /** + * Properties of a CustomModuleValidationError. + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @interface ICustomModuleValidationError + * @property {string|null} [description] CustomModuleValidationError description + * @property {string|null} [fieldPath] CustomModuleValidationError fieldPath + * @property {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null} [start] CustomModuleValidationError start + * @property {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null} [end] CustomModuleValidationError end + */ + + /** + * Constructs a new CustomModuleValidationError. + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @classdesc Represents a CustomModuleValidationError. + * @implements ICustomModuleValidationError + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError=} [properties] Properties to set + */ + function CustomModuleValidationError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomModuleValidationError description. + * @member {string} description + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @instance + */ + CustomModuleValidationError.prototype.description = ""; + + /** + * CustomModuleValidationError fieldPath. + * @member {string} fieldPath + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @instance + */ + CustomModuleValidationError.prototype.fieldPath = ""; + + /** + * CustomModuleValidationError start. + * @member {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null|undefined} start + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @instance + */ + CustomModuleValidationError.prototype.start = null; + + /** + * CustomModuleValidationError end. + * @member {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null|undefined} end + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @instance + */ + CustomModuleValidationError.prototype.end = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomModuleValidationError _start. + * @member {"start"|undefined} _start + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @instance + */ + Object.defineProperty(CustomModuleValidationError.prototype, "_start", { + get: $util.oneOfGetter($oneOfFields = ["start"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CustomModuleValidationError _end. + * @member {"end"|undefined} _end + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @instance + */ + Object.defineProperty(CustomModuleValidationError.prototype, "_end", { + get: $util.oneOfGetter($oneOfFields = ["end"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomModuleValidationError instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError instance + */ + CustomModuleValidationError.create = function create(properties) { + return new CustomModuleValidationError(properties); + }; + + /** + * Encodes the specified CustomModuleValidationError message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError} message CustomModuleValidationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomModuleValidationError.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.fieldPath != null && Object.hasOwnProperty.call(message, "fieldPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldPath); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.encode(message.start, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.encode(message.end, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomModuleValidationError message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError} message CustomModuleValidationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomModuleValidationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomModuleValidationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomModuleValidationError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.fieldPath = reader.string(); + break; + } + case 3: { + message.start = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.decode(reader, reader.uint32()); + break; + } + case 4: { + message.end = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomModuleValidationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomModuleValidationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomModuleValidationError message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomModuleValidationError.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.fieldPath != null && message.hasOwnProperty("fieldPath")) + if (!$util.isString(message.fieldPath)) + return "fieldPath: string expected"; + if (message.start != null && message.hasOwnProperty("start")) { + properties._start = 1; + { + var error = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify(message.start); + if (error) + return "start." + error; + } + } + if (message.end != null && message.hasOwnProperty("end")) { + properties._end = 1; + { + var error = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify(message.end); + if (error) + return "end." + error; + } + } + return null; + }; + + /** + * Creates a CustomModuleValidationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError + */ + CustomModuleValidationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError(); + if (object.description != null) + message.description = String(object.description); + if (object.fieldPath != null) + message.fieldPath = String(object.fieldPath); + if (object.start != null) { + if (typeof object.start !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.start: object expected"); + message.start = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.fromObject(object.start); + } + if (object.end != null) { + if (typeof object.end !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.end: object expected"); + message.end = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.fromObject(object.end); + } + return message; + }; + + /** + * Creates a plain object from a CustomModuleValidationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} message CustomModuleValidationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomModuleValidationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.fieldPath = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + object.fieldPath = message.fieldPath; + if (message.start != null && message.hasOwnProperty("start")) { + object.start = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.toObject(message.start, options); + if (options.oneofs) + object._start = "start"; + } + if (message.end != null && message.hasOwnProperty("end")) { + object.end = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.toObject(message.end, options); + if (options.oneofs) + object._end = "end"; + } + return object; + }; + + /** + * Converts this CustomModuleValidationError to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @instance + * @returns {Object.} JSON object + */ + CustomModuleValidationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomModuleValidationError + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomModuleValidationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError"; + }; + + return CustomModuleValidationError; + })(); + + ValidateEventThreatDetectionCustomModuleResponse.Position = (function() { + + /** + * Properties of a Position. + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @interface IPosition + * @property {number|null} [lineNumber] Position lineNumber + * @property {number|null} [columnNumber] Position columnNumber + */ + + /** + * Constructs a new Position. + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse + * @classdesc Represents a Position. + * @implements IPosition + * @constructor + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition=} [properties] Properties to set + */ + function Position(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Position lineNumber. + * @member {number} lineNumber + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @instance + */ + Position.prototype.lineNumber = 0; + + /** + * Position columnNumber. + * @member {number} columnNumber + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @instance + */ + Position.prototype.columnNumber = 0; + + /** + * Creates a new Position instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position instance + */ + Position.create = function create(properties) { + return new Position(properties); + }; + + /** + * Encodes the specified Position message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition} message Position message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Position.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lineNumber != null && Object.hasOwnProperty.call(message, "lineNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lineNumber); + if (message.columnNumber != null && Object.hasOwnProperty.call(message, "columnNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.columnNumber); + return writer; + }; + + /** + * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition} message Position message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Position.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Position message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Position.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lineNumber = reader.int32(); + break; + } + case 2: { + message.columnNumber = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Position message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Position.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Position message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Position.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + if (!$util.isInteger(message.lineNumber)) + return "lineNumber: integer expected"; + if (message.columnNumber != null && message.hasOwnProperty("columnNumber")) + if (!$util.isInteger(message.columnNumber)) + return "columnNumber: integer expected"; + return null; + }; + + /** + * Creates a Position message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position + */ + Position.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position(); + if (object.lineNumber != null) + message.lineNumber = object.lineNumber | 0; + if (object.columnNumber != null) + message.columnNumber = object.columnNumber | 0; + return message; + }; + + /** + * Creates a plain object from a Position message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} message Position + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Position.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lineNumber = 0; + object.columnNumber = 0; + } + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + object.lineNumber = message.lineNumber; + if (message.columnNumber != null && message.hasOwnProperty("columnNumber")) + object.columnNumber = message.columnNumber; + return object; + }; + + /** + * Converts this Position to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @instance + * @returns {Object.} JSON object + */ + Position.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Position + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position"; + }; + + return Position; + })(); + + return ValidateEventThreatDetectionCustomModuleResponse; + })(); + + v1.GetSecurityCenterServiceRequest = (function() { + + /** + * Properties of a GetSecurityCenterServiceRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IGetSecurityCenterServiceRequest + * @property {string|null} [name] GetSecurityCenterServiceRequest name + * @property {boolean|null} [showEligibleModulesOnly] GetSecurityCenterServiceRequest showEligibleModulesOnly + */ + + /** + * Constructs a new GetSecurityCenterServiceRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a GetSecurityCenterServiceRequest. + * @implements IGetSecurityCenterServiceRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest=} [properties] Properties to set + */ + function GetSecurityCenterServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSecurityCenterServiceRequest name. + * @member {string} name + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @instance + */ + GetSecurityCenterServiceRequest.prototype.name = ""; + + /** + * GetSecurityCenterServiceRequest showEligibleModulesOnly. + * @member {boolean} showEligibleModulesOnly + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @instance + */ + GetSecurityCenterServiceRequest.prototype.showEligibleModulesOnly = false; + + /** + * Creates a new GetSecurityCenterServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest instance + */ + GetSecurityCenterServiceRequest.create = function create(properties) { + return new GetSecurityCenterServiceRequest(properties); + }; + + /** + * Encodes the specified GetSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} message GetSecurityCenterServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecurityCenterServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.showEligibleModulesOnly != null && Object.hasOwnProperty.call(message, "showEligibleModulesOnly")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.showEligibleModulesOnly); + return writer; + }; + + /** + * Encodes the specified GetSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} message GetSecurityCenterServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSecurityCenterServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecurityCenterServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.showEligibleModulesOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSecurityCenterServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSecurityCenterServiceRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSecurityCenterServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) + if (typeof message.showEligibleModulesOnly !== "boolean") + return "showEligibleModulesOnly: boolean expected"; + return null; + }; + + /** + * Creates a GetSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest + */ + GetSecurityCenterServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.showEligibleModulesOnly != null) + message.showEligibleModulesOnly = Boolean(object.showEligibleModulesOnly); + return message; + }; + + /** + * Creates a plain object from a GetSecurityCenterServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} message GetSecurityCenterServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSecurityCenterServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.showEligibleModulesOnly = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) + object.showEligibleModulesOnly = message.showEligibleModulesOnly; + return object; + }; + + /** + * Converts this GetSecurityCenterServiceRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @instance + * @returns {Object.} JSON object + */ + GetSecurityCenterServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSecurityCenterServiceRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSecurityCenterServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest"; + }; + + return GetSecurityCenterServiceRequest; + })(); + + v1.ListSecurityCenterServicesRequest = (function() { + + /** + * Properties of a ListSecurityCenterServicesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListSecurityCenterServicesRequest + * @property {string|null} [parent] ListSecurityCenterServicesRequest parent + * @property {number|null} [pageSize] ListSecurityCenterServicesRequest pageSize + * @property {string|null} [pageToken] ListSecurityCenterServicesRequest pageToken + * @property {boolean|null} [showEligibleModulesOnly] ListSecurityCenterServicesRequest showEligibleModulesOnly + */ + + /** + * Constructs a new ListSecurityCenterServicesRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListSecurityCenterServicesRequest. + * @implements IListSecurityCenterServicesRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest=} [properties] Properties to set + */ + function ListSecurityCenterServicesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSecurityCenterServicesRequest parent. + * @member {string} parent + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @instance + */ + ListSecurityCenterServicesRequest.prototype.parent = ""; + + /** + * ListSecurityCenterServicesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @instance + */ + ListSecurityCenterServicesRequest.prototype.pageSize = 0; + + /** + * ListSecurityCenterServicesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @instance + */ + ListSecurityCenterServicesRequest.prototype.pageToken = ""; + + /** + * ListSecurityCenterServicesRequest showEligibleModulesOnly. + * @member {boolean} showEligibleModulesOnly + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @instance + */ + ListSecurityCenterServicesRequest.prototype.showEligibleModulesOnly = false; + + /** + * Creates a new ListSecurityCenterServicesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest instance + */ + ListSecurityCenterServicesRequest.create = function create(properties) { + return new ListSecurityCenterServicesRequest(properties); + }; + + /** + * Encodes the specified ListSecurityCenterServicesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} message ListSecurityCenterServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityCenterServicesRequest.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.showEligibleModulesOnly != null && Object.hasOwnProperty.call(message, "showEligibleModulesOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.showEligibleModulesOnly); + return writer; + }; + + /** + * Encodes the specified ListSecurityCenterServicesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} message ListSecurityCenterServicesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityCenterServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityCenterServicesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest(); + 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.showEligibleModulesOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityCenterServicesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSecurityCenterServicesRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecurityCenterServicesRequest.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.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) + if (typeof message.showEligibleModulesOnly !== "boolean") + return "showEligibleModulesOnly: boolean expected"; + return null; + }; + + /** + * Creates a ListSecurityCenterServicesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest + */ + ListSecurityCenterServicesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest(); + 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.showEligibleModulesOnly != null) + message.showEligibleModulesOnly = Boolean(object.showEligibleModulesOnly); + return message; + }; + + /** + * Creates a plain object from a ListSecurityCenterServicesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} message ListSecurityCenterServicesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecurityCenterServicesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.showEligibleModulesOnly = false; + } + 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.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) + object.showEligibleModulesOnly = message.showEligibleModulesOnly; + return object; + }; + + /** + * Converts this ListSecurityCenterServicesRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSecurityCenterServicesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSecurityCenterServicesRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSecurityCenterServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest"; + }; + + return ListSecurityCenterServicesRequest; + })(); + + v1.ListSecurityCenterServicesResponse = (function() { + + /** + * Properties of a ListSecurityCenterServicesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IListSecurityCenterServicesResponse + * @property {Array.|null} [securityCenterServices] ListSecurityCenterServicesResponse securityCenterServices + * @property {string|null} [nextPageToken] ListSecurityCenterServicesResponse nextPageToken + */ + + /** + * Constructs a new ListSecurityCenterServicesResponse. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents a ListSecurityCenterServicesResponse. + * @implements IListSecurityCenterServicesResponse + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse=} [properties] Properties to set + */ + function ListSecurityCenterServicesResponse(properties) { + this.securityCenterServices = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSecurityCenterServicesResponse securityCenterServices. + * @member {Array.} securityCenterServices + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @instance + */ + ListSecurityCenterServicesResponse.prototype.securityCenterServices = $util.emptyArray; + + /** + * ListSecurityCenterServicesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @instance + */ + ListSecurityCenterServicesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListSecurityCenterServicesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse instance + */ + ListSecurityCenterServicesResponse.create = function create(properties) { + return new ListSecurityCenterServicesResponse(properties); + }; + + /** + * Encodes the specified ListSecurityCenterServicesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse} message ListSecurityCenterServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityCenterServicesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securityCenterServices != null && message.securityCenterServices.length) + for (var i = 0; i < message.securityCenterServices.length; ++i) + $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.encode(message.securityCenterServices[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 ListSecurityCenterServicesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse} message ListSecurityCenterServicesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSecurityCenterServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityCenterServicesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.securityCenterServices && message.securityCenterServices.length)) + message.securityCenterServices = []; + message.securityCenterServices.push($root.google.cloud.securitycentermanagement.v1.SecurityCenterService.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSecurityCenterServicesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSecurityCenterServicesResponse message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSecurityCenterServicesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securityCenterServices != null && message.hasOwnProperty("securityCenterServices")) { + if (!Array.isArray(message.securityCenterServices)) + return "securityCenterServices: array expected"; + for (var i = 0; i < message.securityCenterServices.length; ++i) { + var error = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.verify(message.securityCenterServices[i]); + if (error) + return "securityCenterServices." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListSecurityCenterServicesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse + */ + ListSecurityCenterServicesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse(); + if (object.securityCenterServices) { + if (!Array.isArray(object.securityCenterServices)) + throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.securityCenterServices: array expected"); + message.securityCenterServices = []; + for (var i = 0; i < object.securityCenterServices.length; ++i) { + if (typeof object.securityCenterServices[i] !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.securityCenterServices: object expected"); + message.securityCenterServices[i] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.fromObject(object.securityCenterServices[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListSecurityCenterServicesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} message ListSecurityCenterServicesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSecurityCenterServicesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.securityCenterServices = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.securityCenterServices && message.securityCenterServices.length) { + object.securityCenterServices = []; + for (var j = 0; j < message.securityCenterServices.length; ++j) + object.securityCenterServices[j] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.toObject(message.securityCenterServices[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListSecurityCenterServicesResponse to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSecurityCenterServicesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSecurityCenterServicesResponse + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSecurityCenterServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse"; + }; + + return ListSecurityCenterServicesResponse; + })(); + + v1.UpdateSecurityCenterServiceRequest = (function() { + + /** + * Properties of an UpdateSecurityCenterServiceRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @interface IUpdateSecurityCenterServiceRequest + * @property {google.cloud.securitycentermanagement.v1.ISecurityCenterService|null} [securityCenterService] UpdateSecurityCenterServiceRequest securityCenterService + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityCenterServiceRequest updateMask + * @property {boolean|null} [validateOnly] UpdateSecurityCenterServiceRequest validateOnly + */ + + /** + * Constructs a new UpdateSecurityCenterServiceRequest. + * @memberof google.cloud.securitycentermanagement.v1 + * @classdesc Represents an UpdateSecurityCenterServiceRequest. + * @implements IUpdateSecurityCenterServiceRequest + * @constructor + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest=} [properties] Properties to set + */ + function UpdateSecurityCenterServiceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSecurityCenterServiceRequest securityCenterService. + * @member {google.cloud.securitycentermanagement.v1.ISecurityCenterService|null|undefined} securityCenterService + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @instance + */ + UpdateSecurityCenterServiceRequest.prototype.securityCenterService = null; + + /** + * UpdateSecurityCenterServiceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @instance + */ + UpdateSecurityCenterServiceRequest.prototype.updateMask = null; + + /** + * UpdateSecurityCenterServiceRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @instance + */ + UpdateSecurityCenterServiceRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateSecurityCenterServiceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest=} [properties] Properties to set + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest instance + */ + UpdateSecurityCenterServiceRequest.create = function create(properties) { + return new UpdateSecurityCenterServiceRequest(properties); + }; + + /** + * Encodes the specified UpdateSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} message UpdateSecurityCenterServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecurityCenterServiceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.securityCenterService != null && Object.hasOwnProperty.call(message, "securityCenterService")) + $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.encode(message.securityCenterService, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified UpdateSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} message UpdateSecurityCenterServiceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSecurityCenterServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecurityCenterServiceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.securityCenterService = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSecurityCenterServiceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSecurityCenterServiceRequest message. + * @function verify + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSecurityCenterServiceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.securityCenterService != null && message.hasOwnProperty("securityCenterService")) { + var error = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.verify(message.securityCenterService); + if (error) + return "securityCenterService." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates an UpdateSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest + */ + UpdateSecurityCenterServiceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest) + return object; + var message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest(); + if (object.securityCenterService != null) { + if (typeof object.securityCenterService !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.securityCenterService: object expected"); + message.securityCenterService = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.fromObject(object.securityCenterService); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from an UpdateSecurityCenterServiceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} message UpdateSecurityCenterServiceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSecurityCenterServiceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.securityCenterService = null; + object.updateMask = null; + object.validateOnly = false; + } + if (message.securityCenterService != null && message.hasOwnProperty("securityCenterService")) + object.securityCenterService = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.toObject(message.securityCenterService, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this UpdateSecurityCenterServiceRequest to JSON. + * @function toJSON + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSecurityCenterServiceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSecurityCenterServiceRequest + * @function getTypeUrl + * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSecurityCenterServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest"; + }; + + return UpdateSecurityCenterServiceRequest; + })(); + + return v1; + })(); + + return securitycentermanagement; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) + object.referenceDocsUri = ""; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.features = null; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.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; + })(); + + protobuf.Struct = (function() { + + /** + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields + */ + + /** + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct + * @constructor + * @param {google.protobuf.IStruct=} [properties] Properties to set + */ + function Struct(properties) { + this.fields = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct + * @instance + */ + Struct.prototype.fields = $util.emptyObject; + + /** + * Creates a new Struct instance using the specified properties. + * @function create + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct=} [properties] Properties to set + * @returns {google.protobuf.Struct} Struct instance + */ + Struct.create = function create(properties) { + return new Struct(properties); + }; + + /** + * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) + for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.IStruct} message Struct message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Struct.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Struct message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.fields === $util.emptyObject) + message.fields = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fields[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Struct message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Struct + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Struct} Struct + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Struct.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Struct message. + * @function verify + * @memberof google.protobuf.Struct + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Struct.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!$util.isObject(message.fields)) + return "fields: object expected"; + var key = Object.keys(message.fields); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); + if (error) + return "fields." + error; + } + } + return null; + }; + + /** + * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Struct + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Struct} Struct + */ + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) + return object; + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Struct + * @static + * @param {google.protobuf.Struct} message Struct + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Struct.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Struct to JSON. + * @function toJSON + * @memberof google.protobuf.Struct + * @instance + * @returns {Object.} JSON object + */ + Struct.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; + })(); + + protobuf.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue + */ + + /** + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.protobuf.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.nullValue = null; + + /** + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.numberValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.boolValue = null; + + /** + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.structValue = null; + + /** + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value + * @instance + */ + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue=} [properties] Properties to set + * @returns {google.protobuf.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); + if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) + $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) + $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nullValue = reader.int32(); + break; + } + case 2: { + message.numberValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.boolValue = reader.bool(); + break; + } + case 5: { + message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 6: { + message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.protobuf.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + properties.kind = 1; + switch (message.nullValue) { + default: + return "nullValue: enum value expected"; + case 0: + break; + } + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.Struct.verify(message.structValue); + if (error) + return "structValue." + error; + } + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.listValue); + if (error) + return "listValue." + error; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) + return object; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; + } + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Value + * @static + * @param {google.protobuf.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.protobuf.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; + })(); + + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {number} + * @property {number} NULL_VALUE=0 NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = 0; + return values; + })(); + + protobuf.ListValue = (function() { + + /** + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values + */ + + /** + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue + * @constructor + * @param {google.protobuf.IListValue=} [properties] Properties to set + */ + function ListValue(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue + * @instance + */ + ListValue.prototype.values = $util.emptyArray; + + /** + * Creates a new ListValue instance using the specified properties. + * @function create + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue=} [properties] Properties to set + * @returns {google.protobuf.ListValue} ListValue instance + */ + ListValue.create = function create(properties) { + return new ListValue(properties); + }; + + /** + * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.IListValue} message ListValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ListValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ListValue} ListValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListValue message. + * @function verify + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue + */ + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue + * @instance + * @returns {Object.} JSON object + */ + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + + return ListValue; + })(); + + 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; + })(); + + return protobuf; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + + return Binding; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; + })(); + + v1.AuditLogConfig = (function() { + + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ + + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; + + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; + + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) + return object; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + + return Expr; + })(); + + return type; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json new file mode 100644 index 00000000000..c4c35cb2721 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json @@ -0,0 +1,3971 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "securitycentermanagement": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.SecurityCenterManagement.V1", + "go_package": "cloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb;securitycentermanagementpb", + "java_multiple_files": true, + "java_outer_classname": "SecurityCenterManagementProto", + "java_package": "com.google.cloud.securitycentermanagement.v1", + "php_namespace": "Google\\Cloud\\SecurityCenterManagement\\V1", + "ruby_package": "Google::Cloud::SecurityCenterManagement::V1", + "(google.api.resource_definition).type": "securitycentermanagement.googleapis.com/FolderLocation", + "(google.api.resource_definition).pattern": "folders/{folder}/locations/{location}" + }, + "nested": { + "SecurityCenterManagement": { + "options": { + "(google.api.default_host)": "securitycentermanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "requestType": "ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", + "responseType": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" + }, + { + "get": "/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "requestType": "GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", + "responseType": "EffectiveSecurityHealthAnalyticsCustomModule", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" + }, + { + "get": "/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListSecurityHealthAnalyticsCustomModules": { + "requestType": "ListSecurityHealthAnalyticsCustomModulesRequest", + "responseType": "ListSecurityHealthAnalyticsCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules" + }, + { + "get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "requestType": "ListDescendantSecurityHealthAnalyticsCustomModulesRequest", + "responseType": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" + }, + { + "get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetSecurityHealthAnalyticsCustomModule": { + "requestType": "GetSecurityHealthAnalyticsCustomModuleRequest", + "responseType": "SecurityHealthAnalyticsCustomModule", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" + }, + { + "get": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "requestType": "CreateSecurityHealthAnalyticsCustomModuleRequest", + "responseType": "SecurityHealthAnalyticsCustomModule", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", + "(google.api.http).body": "security_health_analytics_custom_module", + "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules", + "(google.api.http).additional_bindings.body": "security_health_analytics_custom_module", + "(google.api.method_signature)": "parent,security_health_analytics_custom_module" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", + "body": "security_health_analytics_custom_module", + "additional_bindings": [ + { + "post": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules", + "body": "security_health_analytics_custom_module" + }, + { + "post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules", + "body": "security_health_analytics_custom_module" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,security_health_analytics_custom_module" + } + ] + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "requestType": "UpdateSecurityHealthAnalyticsCustomModuleRequest", + "responseType": "SecurityHealthAnalyticsCustomModule", + "options": { + "(google.api.http).patch": "/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "(google.api.http).body": "security_health_analytics_custom_module", + "(google.api.http).additional_bindings.patch": "/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "(google.api.http).additional_bindings.body": "security_health_analytics_custom_module", + "(google.api.method_signature)": "security_health_analytics_custom_module,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "body": "security_health_analytics_custom_module", + "additional_bindings": [ + { + "patch": "/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "body": "security_health_analytics_custom_module" + }, + { + "patch": "/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "body": "security_health_analytics_custom_module" + } + ] + } + }, + { + "(google.api.method_signature)": "security_health_analytics_custom_module,update_mask" + } + ] + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "requestType": "DeleteSecurityHealthAnalyticsCustomModuleRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", + "additional_bindings": [ + { + "delete": "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" + }, + { + "delete": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "requestType": "SimulateSecurityHealthAnalyticsCustomModuleRequest", + "responseType": "SimulateSecurityHealthAnalyticsCustomModuleResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,custom_config,resource" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", + "body": "*", + "additional_bindings": [ + { + "post": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", + "body": "*" + }, + { + "post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,custom_config,resource" + } + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "requestType": "ListEffectiveEventThreatDetectionCustomModulesRequest", + "responseType": "ListEffectiveEventThreatDetectionCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModules" + }, + { + "get": "/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "requestType": "GetEffectiveEventThreatDetectionCustomModuleRequest", + "responseType": "EffectiveEventThreatDetectionCustomModule", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" + }, + { + "get": "/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEventThreatDetectionCustomModules": { + "requestType": "ListEventThreatDetectionCustomModulesRequest", + "responseType": "ListEventThreatDetectionCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules" + }, + { + "get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "requestType": "ListDescendantEventThreatDetectionCustomModulesRequest", + "responseType": "ListDescendantEventThreatDetectionCustomModulesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" + }, + { + "get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetEventThreatDetectionCustomModule": { + "requestType": "GetEventThreatDetectionCustomModuleRequest", + "responseType": "EventThreatDetectionCustomModule", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" + }, + { + "get": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateEventThreatDetectionCustomModule": { + "requestType": "CreateEventThreatDetectionCustomModuleRequest", + "responseType": "EventThreatDetectionCustomModule", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", + "(google.api.http).body": "event_threat_detection_custom_module", + "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules", + "(google.api.http).additional_bindings.body": "event_threat_detection_custom_module", + "(google.api.method_signature)": "parent,event_threat_detection_custom_module" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", + "body": "event_threat_detection_custom_module", + "additional_bindings": [ + { + "post": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules", + "body": "event_threat_detection_custom_module" + }, + { + "post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules", + "body": "event_threat_detection_custom_module" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,event_threat_detection_custom_module" + } + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "requestType": "UpdateEventThreatDetectionCustomModuleRequest", + "responseType": "EventThreatDetectionCustomModule", + "options": { + "(google.api.http).patch": "/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", + "(google.api.http).body": "event_threat_detection_custom_module", + "(google.api.http).additional_bindings.patch": "/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", + "(google.api.http).additional_bindings.body": "event_threat_detection_custom_module", + "(google.api.method_signature)": "event_threat_detection_custom_module,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", + "body": "event_threat_detection_custom_module", + "additional_bindings": [ + { + "patch": "/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}", + "body": "event_threat_detection_custom_module" + }, + { + "patch": "/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", + "body": "event_threat_detection_custom_module" + } + ] + } + }, + { + "(google.api.method_signature)": "event_threat_detection_custom_module,update_mask" + } + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "requestType": "DeleteEventThreatDetectionCustomModuleRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", + "additional_bindings": [ + { + "delete": "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" + }, + { + "delete": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "requestType": "ValidateEventThreatDetectionCustomModuleRequest", + "responseType": "ValidateEventThreatDetectionCustomModuleResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate", + "body": "*", + "additional_bindings": [ + { + "post": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate", + "body": "*" + }, + { + "post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate", + "body": "*" + } + ] + } + } + ] + }, + "GetSecurityCenterService": { + "requestType": "GetSecurityCenterServiceRequest", + "responseType": "SecurityCenterService", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/securityCenterServices/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/securityCenterServices/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/securityCenterServices/*}", + "additional_bindings": [ + { + "get": "/v1/{name=folders/*/locations/*/securityCenterServices/*}" + }, + { + "get": "/v1/{name=organizations/*/locations/*/securityCenterServices/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListSecurityCenterServices": { + "requestType": "ListSecurityCenterServicesRequest", + "responseType": "ListSecurityCenterServicesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/securityCenterServices", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/securityCenterServices", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/securityCenterServices", + "additional_bindings": [ + { + "get": "/v1/{parent=folders/*/locations/*}/securityCenterServices" + }, + { + "get": "/v1/{parent=organizations/*/locations/*}/securityCenterServices" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateSecurityCenterService": { + "requestType": "UpdateSecurityCenterServiceRequest", + "responseType": "SecurityCenterService", + "options": { + "(google.api.http).patch": "/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}", + "(google.api.http).body": "security_center_service", + "(google.api.http).additional_bindings.patch": "/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}", + "(google.api.http).additional_bindings.body": "security_center_service", + "(google.api.method_signature)": "security_center_service,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}", + "body": "security_center_service", + "additional_bindings": [ + { + "patch": "/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}", + "body": "security_center_service" + }, + { + "patch": "/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}", + "body": "security_center_service" + } + ] + } + }, + { + "(google.api.method_signature)": "security_center_service,update_mask" + } + ] + } + } + }, + "SecurityCenterService": { + "options": { + "(google.api.resource).type": "securitycentermanagement.googleapis.com/SecurityCenterService", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/securityCenterServices/{service}", + "(google.api.resource).plural": "securityCenterServices", + "(google.api.resource).singular": "securityCenterService" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "intendedEnablementState": { + "type": "EnablementState", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "effectiveEnablementState": { + "type": "EnablementState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "modules": { + "keyType": "string", + "type": "ModuleSettings", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceConfig": { + "type": "google.protobuf.Struct", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ModuleSettings": { + "fields": { + "intendedEnablementState": { + "type": "EnablementState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "effectiveEnablementState": { + "type": "EnablementState", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "INHERITED": 1, + "ENABLED": 2, + "DISABLED": 3, + "INGEST_ONLY": 4 + } + } + } + }, + "EffectiveSecurityHealthAnalyticsCustomModule": { + "options": { + "(google.api.resource).type": "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule", + "(google.api.resource).pattern": "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}", + "(google.api.resource).plural": "effectiveSecurityHealthAnalyticsCustomModules", + "(google.api.resource).singular": "effectiveSecurityHealthAnalyticsCustomModule" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "customConfig": { + "type": "CustomConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enablementState": { + "type": "EnablementState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + } + } + }, + "ListEffectiveSecurityHealthAnalyticsCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse": { + "fields": { + "effectiveSecurityHealthAnalyticsCustomModules": { + "rule": "repeated", + "type": "EffectiveSecurityHealthAnalyticsCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEffectiveSecurityHealthAnalyticsCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" + } + } + } + }, + "SecurityHealthAnalyticsCustomModule": { + "options": { + "(google.api.resource).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule", + "(google.api.resource).pattern": "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}", + "(google.api.resource).plural": "securityHealthAnalyticsCustomModules", + "(google.api.resource).singular": "securityHealthAnalyticsCustomModule" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enablementState": { + "type": "EnablementState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastEditor": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "ancestorModule": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + }, + "customConfig": { + "type": "CustomConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + "INHERITED": 3 + } + } + } + }, + "CustomConfig": { + "fields": { + "predicate": { + "type": "google.type.Expr", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "customOutput": { + "type": "CustomOutputSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resourceSelector": { + "type": "ResourceSelector", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "severity": { + "type": "Severity", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "recommendation": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CustomOutputSpec": { + "fields": { + "properties": { + "rule": "repeated", + "type": "Property", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Property": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "valueExpression": { + "type": "google.type.Expr", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ResourceSelector": { + "fields": { + "resourceTypes": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Severity": { + "values": { + "SEVERITY_UNSPECIFIED": 0, + "CRITICAL": 1, + "HIGH": 2, + "MEDIUM": 3, + "LOW": 4 + } + } + } + }, + "ListSecurityHealthAnalyticsCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListSecurityHealthAnalyticsCustomModulesResponse": { + "fields": { + "securityHealthAnalyticsCustomModules": { + "rule": "repeated", + "type": "SecurityHealthAnalyticsCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListDescendantSecurityHealthAnalyticsCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDescendantSecurityHealthAnalyticsCustomModulesResponse": { + "fields": { + "securityHealthAnalyticsCustomModules": { + "rule": "repeated", + "type": "SecurityHealthAnalyticsCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetSecurityHealthAnalyticsCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + } + } + }, + "CreateSecurityHealthAnalyticsCustomModuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + }, + "securityHealthAnalyticsCustomModule": { + "type": "SecurityHealthAnalyticsCustomModule", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateSecurityHealthAnalyticsCustomModuleRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "securityHealthAnalyticsCustomModule": { + "type": "SecurityHealthAnalyticsCustomModule", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteSecurityHealthAnalyticsCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" + } + }, + "validateOnly": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SimulateSecurityHealthAnalyticsCustomModuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "customConfig": { + "type": "CustomConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "SimulatedResource", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "SimulatedResource": { + "fields": { + "resourceType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resourceData": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "iamPolicyData": { + "type": "google.iam.v1.Policy", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SimulatedFinding": { + "options": { + "(google.api.resource).type": "securitycenter.googleapis.com/Finding", + "(google.api.resource).pattern": "projects/{project}/sources/{source}/findings/{finding}", + "(google.api.resource).plural": "findings", + "(google.api.resource).singular": "finding" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "parent": { + "type": "string", + "id": 2 + }, + "resourceName": { + "type": "string", + "id": 3 + }, + "category": { + "type": "string", + "id": 4 + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sourceProperties": { + "keyType": "string", + "type": "google.protobuf.Value", + "id": 6 + }, + "eventTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "severity": { + "type": "Severity", + "id": 8 + }, + "findingClass": { + "type": "FindingClass", + "id": 9 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "INACTIVE": 2 + } + }, + "Severity": { + "values": { + "SEVERITY_UNSPECIFIED": 0, + "CRITICAL": 1, + "HIGH": 2, + "MEDIUM": 3, + "LOW": 4 + } + }, + "FindingClass": { + "values": { + "FINDING_CLASS_UNSPECIFIED": 0, + "THREAT": 1, + "VULNERABILITY": 2, + "MISCONFIGURATION": 3, + "OBSERVATION": 4, + "SCC_ERROR": 5, + "POSTURE_VIOLATION": 6, + "TOXIC_COMBINATION": 7 + } + } + } + }, + "SimulateSecurityHealthAnalyticsCustomModuleResponse": { + "fields": { + "result": { + "type": "SimulatedResult", + "id": 1 + } + }, + "nested": { + "SimulatedResult": { + "oneofs": { + "result": { + "oneof": [ + "finding", + "noViolation", + "error" + ] + } + }, + "fields": { + "finding": { + "type": "SimulatedFinding", + "id": 1 + }, + "noViolation": { + "type": "google.protobuf.Empty", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + } + } + } + } + }, + "EffectiveEventThreatDetectionCustomModule": { + "options": { + "(google.api.resource).type": "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule", + "(google.api.resource).pattern": "folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}", + "(google.api.resource).plural": "effectiveEventThreatDetectionCustomModules", + "(google.api.resource).singular": "effectiveEventThreatDetectionCustomModule" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "config": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enablementState": { + "type": "EnablementState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + } + } + }, + "ListEffectiveEventThreatDetectionCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEffectiveEventThreatDetectionCustomModulesResponse": { + "fields": { + "effectiveEventThreatDetectionCustomModules": { + "rule": "repeated", + "type": "EffectiveEventThreatDetectionCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEffectiveEventThreatDetectionCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" + } + } + } + }, + "EventThreatDetectionCustomModule": { + "options": { + "(google.api.resource).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule", + "(google.api.resource).pattern": "folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}", + "(google.api.resource).plural": "eventThreatDetectionCustomModules", + "(google.api.resource).singular": "eventThreatDetectionCustomModule" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "config": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ancestorModule": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "enablementState": { + "type": "EnablementState", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "type": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastEditor": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "EnablementState": { + "values": { + "ENABLEMENT_STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + "INHERITED": 3 + } + } + } + }, + "ListEventThreatDetectionCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListEventThreatDetectionCustomModulesResponse": { + "fields": { + "eventThreatDetectionCustomModules": { + "rule": "repeated", + "type": "EventThreatDetectionCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListDescendantEventThreatDetectionCustomModulesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDescendantEventThreatDetectionCustomModulesResponse": { + "fields": { + "eventThreatDetectionCustomModules": { + "rule": "repeated", + "type": "EventThreatDetectionCustomModule", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetEventThreatDetectionCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + } + } + }, + "CreateEventThreatDetectionCustomModuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "eventThreatDetectionCustomModule": { + "type": "EventThreatDetectionCustomModule", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateEventThreatDetectionCustomModuleRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "eventThreatDetectionCustomModule": { + "type": "EventThreatDetectionCustomModule", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteEventThreatDetectionCustomModuleRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "validateOnly": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ValidateEventThreatDetectionCustomModuleRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" + } + }, + "rawText": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ValidateEventThreatDetectionCustomModuleResponse": { + "fields": { + "errors": { + "rule": "repeated", + "type": "CustomModuleValidationError", + "id": 2 + } + }, + "nested": { + "CustomModuleValidationError": { + "oneofs": { + "_start": { + "oneof": [ + "start" + ] + }, + "_end": { + "oneof": [ + "end" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "fieldPath": { + "type": "string", + "id": 2 + }, + "start": { + "type": "Position", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "end": { + "type": "Position", + "id": 4, + "options": { + "proto3_optional": true + } + } + } + }, + "Position": { + "fields": { + "lineNumber": { + "type": "int32", + "id": 1 + }, + "columnNumber": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "GetSecurityCenterServiceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityCenterService" + } + }, + "showEligibleModulesOnly": { + "type": "bool", + "id": 2 + } + } + }, + "ListSecurityCenterServicesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityCenterService" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "showEligibleModulesOnly": { + "type": "bool", + "id": 4 + } + } + }, + "ListSecurityCenterServicesResponse": { + "fields": { + "securityCenterServices": { + "rule": "repeated", + "type": "SecurityCenterService", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateSecurityCenterServiceRequest": { + "fields": { + "securityCenterService": { + "type": "SecurityCenterService", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19, + "options": { + "packed": false + } + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + } + } + }, + "OneofOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO2", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + } + }, + "extensions": [ + [ + 1000, + 1000 + ], + [ + 1001, + 1001 + ], + [ + 1002, + 1002 + ], + [ + 9990, + 9990 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + } + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + } + } + }, + "FeatureSetDefaults": { + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "features": { + "type": "FeatureSet", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + }, + "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 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js new file mode 100644 index 00000000000..6609ecee720 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js @@ -0,0 +1,84 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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, eventThreatDetectionCustomModule) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of parent for the module, in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. The module to create. The + * EventThreatDetectionCustomModule.name google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name + * field is ignored; Security Command Center generates the name. + */ + // const eventThreatDetectionCustomModule = {} + /** + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. + */ + // const validateOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callCreateEventThreatDetectionCustomModule() { + // Construct request + const request = { + parent, + eventThreatDetectionCustomModule, + }; + + // Run request + const response = await securitycentermanagementClient.createEventThreatDetectionCustomModule(request); + console.log(response); + } + + callCreateEventThreatDetectionCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js new file mode 100644 index 00000000000..5c6e5cfb7ab --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.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, securityHealthAnalyticsCustomModule) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the parent organization, folder, or project of the + * module, in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. The resource being created. + */ + // const securityHealthAnalyticsCustomModule = {} + /** + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. + */ + // const validateOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callCreateSecurityHealthAnalyticsCustomModule() { + // Construct request + const request = { + parent, + securityHealthAnalyticsCustomModule, + }; + + // Run request + const response = await securitycentermanagementClient.createSecurityHealthAnalyticsCustomModule(request); + console.log(response); + } + + callCreateSecurityHealthAnalyticsCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js new file mode 100644 index 00000000000..cfffc386d9c --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + */ + // const name = 'abc123' + /** + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. + */ + // const validateOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callDeleteEventThreatDetectionCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycentermanagementClient.deleteEventThreatDetectionCustomModule(request); + console.log(response); + } + + callDeleteEventThreatDetectionCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js new file mode 100644 index 00000000000..6fee6373e18 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the SHA custom module, in one of the + * following formats: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + */ + // const name = 'abc123' + /** + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during deletion of the module + * Defaults to `false`. + */ + // const validateOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callDeleteSecurityHealthAnalyticsCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycentermanagementClient.deleteSecurityHealthAnalyticsCustomModule(request); + console.log(response); + } + + callDeleteSecurityHealthAnalyticsCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js new file mode 100644 index 00000000000..678c53d4e09 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + */ + // const name = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callGetEffectiveEventThreatDetectionCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycentermanagementClient.getEffectiveEventThreatDetectionCustomModule(request); + console.log(response); + } + + callGetEffectiveEventThreatDetectionCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js new file mode 100644 index 00000000000..11d87d6e337 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_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 full resource name of the custom module, specified in one of + * the following formats: + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + */ + // const name = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callGetEffectiveSecurityHealthAnalyticsCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycentermanagementClient.getEffectiveSecurityHealthAnalyticsCustomModule(request); + console.log(response); + } + + callGetEffectiveSecurityHealthAnalyticsCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js new file mode 100644 index 00000000000..9c9f91ef020 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + */ + // const name = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callGetEventThreatDetectionCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycentermanagementClient.getEventThreatDetectionCustomModule(request); + console.log(response); + } + + callGetEventThreatDetectionCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js new file mode 100644 index 00000000000..a1389ae15c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_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 Security Command Center service to retrieve, in one of the + * following formats: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The following values are valid for `{service}`: + * * `container-threat-detection` + * * `event-threat-detection` + * * `security-health-analytics` + * * `vm-threat-detection` + * * `web-security-scanner` + */ + // const name = 'abc123' + /** + * Set to `true` to show only modules that are in scope. By default, all + * modules are shown. + */ + // const showEligibleModulesOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callGetSecurityCenterService() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycentermanagementClient.getSecurityCenterService(request); + console.log(response); + } + + callGetSecurityCenterService(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js new file mode 100644 index 00000000000..20857982d5c --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the resource, in the format + * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. + */ + // const name = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callGetSecurityHealthAnalyticsCustomModule() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await securitycentermanagementClient.getSecurityHealthAnalyticsCustomModule(request); + console.log(response); + } + + callGetSecurityHealthAnalyticsCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js new file mode 100644 index 00000000000..0c7e6f1be95 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of parent to list custom modules, in one of the following + * formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. + */ + // const pageToken = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callListDescendantEventThreatDetectionCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycentermanagementClient.listDescendantEventThreatDetectionCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDescendantEventThreatDetectionCustomModules(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js new file mode 100644 index 00000000000..a841b2d90aa --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.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) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. + */ + // const pageToken = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callListDescendantSecurityHealthAnalyticsCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycentermanagementClient.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDescendantSecurityHealthAnalyticsCustomModules(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js new file mode 100644 index 00000000000..fe3606b692b --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.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) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. + */ + // const pageToken = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callListEffectiveEventThreatDetectionCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycentermanagementClient.listEffectiveEventThreatDetectionCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEffectiveEventThreatDetectionCustomModules(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js new file mode 100644 index 00000000000..4a8d8f423e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.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) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. + */ + // const pageToken = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callListEffectiveSecurityHealthAnalyticsCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycentermanagementClient.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEffectiveSecurityHealthAnalyticsCustomModules(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js new file mode 100644 index 00000000000..0840127b8fd --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js @@ -0,0 +1,80 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of parent to list custom modules, in one of the following + * formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 modules will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. + */ + // const pageToken = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callListEventThreatDetectionCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycentermanagementClient.listEventThreatDetectionCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEventThreatDetectionCustomModules(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js new file mode 100644 index 00000000000..e051aa5c402 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js @@ -0,0 +1,84 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent to list Security Command Center services, + * in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. + */ + // const pageToken = 'abc123' + /** + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. + */ + // const showEligibleModulesOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callListSecurityCenterServices() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycentermanagementClient.listSecurityCenterServicesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSecurityCenterServices(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js new file mode 100644 index 00000000000..b18cca26557 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.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) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + */ + // const pageSize = 1234 + /** + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. + */ + // const pageToken = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callListSecurityHealthAnalyticsCustomModules() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = securitycentermanagementClient.listSecurityHealthAnalyticsCustomModulesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListSecurityHealthAnalyticsCustomModules(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js new file mode 100644 index 00000000000..36db8be6a11 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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, customConfig, resource) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_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 relative resource name of the organization, project, or + * folder. For more information about relative resource names, see AIP-122: + * Resource names (https://google.aip.dev/122). Example: + * `organizations/{organization_id}`. + */ + // const parent = 'abc123' + /** + * Required. The custom configuration that you need to test. + */ + // const customConfig = {} + /** + * Required. Resource data to simulate custom module against. + */ + // const resource = {} + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callSimulateSecurityHealthAnalyticsCustomModule() { + // Construct request + const request = { + parent, + customConfig, + resource, + }; + + // Run request + const response = await securitycentermanagementClient.simulateSecurityHealthAnalyticsCustomModule(request); + console.log(response); + } + + callSimulateSecurityHealthAnalyticsCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js new file mode 100644 index 00000000000..537420ad2cc --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.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(updateMask, eventThreatDetectionCustomModule) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_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 fields to update. If omitted, then all fields are updated. + */ + // const updateMask = {} + /** + * Required. The module being updated. + */ + // const eventThreatDetectionCustomModule = {} + /** + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. + */ + // const validateOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callUpdateEventThreatDetectionCustomModule() { + // Construct request + const request = { + updateMask, + eventThreatDetectionCustomModule, + }; + + // Run request + const response = await securitycentermanagementClient.updateEventThreatDetectionCustomModule(request); + console.log(response); + } + + callUpdateEventThreatDetectionCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js new file mode 100644 index 00000000000..7a733988cf8 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js @@ -0,0 +1,82 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(securityCenterService, updateMask) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_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 updated service. + */ + // const securityCenterService = {} + /** + * Required. The fields to update. Accepts the following values: + * * `intended_enablement_state` + * * `modules` + * If omitted, then all eligible fields are updated. + */ + // const updateMask = {} + /** + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no service will be updated. An `OK` response indicates that + * the request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to update the service could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during update of the service + * Defaults to `false`. + */ + // const validateOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callUpdateSecurityCenterService() { + // Construct request + const request = { + securityCenterService, + updateMask, + }; + + // Run request + const response = await securitycentermanagementClient.updateSecurityCenterService(request); + console.log(response); + } + + callUpdateSecurityCenterService(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js new file mode 100644 index 00000000000..1676bdfde19 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.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(updateMask, securityHealthAnalyticsCustomModule) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_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 fields to update. The following values are valid: + * * `custom_config` + * * `enablement_state` + * If you omit this field or set it to the wildcard value `*`, then all + * eligible fields are updated. + */ + // const updateMask = {} + /** + * Required. The resource being updated. + */ + // const securityHealthAnalyticsCustomModule = {} + /** + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. + */ + // const validateOnly = true + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callUpdateSecurityHealthAnalyticsCustomModule() { + // Construct request + const request = { + updateMask, + securityHealthAnalyticsCustomModule, + }; + + // Run request + const response = await securitycentermanagementClient.updateSecurityHealthAnalyticsCustomModule(request); + console.log(response); + } + + callUpdateSecurityHealthAnalyticsCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js new file mode 100644 index 00000000000..5264f550dc4 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js @@ -0,0 +1,74 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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, rawText, type) { + // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_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. Resource name of the parent to validate the custom modules under, + * in one of the following formats: + * * `organizations/{organization}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. The raw text of the module's contents. Used to generate error + * messages. + */ + // const rawText = 'abc123' + /** + * Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. + */ + // const type = 'abc123' + + // Imports the Securitycentermanagement library + const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; + + // Instantiates a client + const securitycentermanagementClient = new SecurityCenterManagementClient(); + + async function callValidateEventThreatDetectionCustomModule() { + // Construct request + const request = { + parent, + rawText, + type, + }; + + // Run request + const response = await securitycentermanagementClient.validateEventThreatDetectionCustomModule(request); + console.log(response); + } + + callValidateEventThreatDetectionCustomModule(); + // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json new file mode 100644 index 00000000000..1cf92e0ba6d --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json @@ -0,0 +1,983 @@ +{ + "clientLibrary": { + "name": "nodejs-securitycentermanagement", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.securitycentermanagement.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_async", + "title": "SecurityCenterManagement listEffectiveSecurityHealthAnalyticsCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).", + "canonical": true, + "file": "security_center_management.list_effective_security_health_analytics_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEffectiveSecurityHealthAnalyticsCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ListEffectiveSecurityHealthAnalyticsCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_async", + "title": "SecurityCenterManagement getEffectiveSecurityHealthAnalyticsCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule].", + "canonical": true, + "file": "security_center_management.get_effective_security_health_analytics_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEffectiveSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "GetEffectiveSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_async", + "title": "SecurityCenterManagement listSecurityHealthAnalyticsCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).", + "canonical": true, + "file": "security_center_management.list_security_health_analytics_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSecurityHealthAnalyticsCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ListSecurityHealthAnalyticsCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_async", + "title": "SecurityCenterManagement listDescendantSecurityHealthAnalyticsCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its descendants.", + "canonical": true, + "file": "security_center_management.list_descendant_security_health_analytics_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDescendantSecurityHealthAnalyticsCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ListDescendantSecurityHealthAnalyticsCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_async", + "title": "SecurityCenterManagement getSecurityHealthAnalyticsCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule].", + "canonical": true, + "file": "security_center_management.get_security_health_analytics_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "GetSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_async", + "title": "SecurityCenterManagement createSecurityHealthAnalyticsCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are descendants of the given parent. These modules are enabled by default.", + "canonical": true, + "file": "security_center_management.create_security_health_analytics_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "security_health_analytics_custom_module", + "type": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "CreateSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_async", + "title": "SecurityCenterManagement updateSecurityHealthAnalyticsCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom configuration of a module is supported on resident modules only.", + "canonical": true, + "file": "security_center_management.update_security_health_analytics_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "security_health_analytics_custom_module", + "type": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "UpdateSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_async", + "title": "SecurityCenterManagement deleteSecurityHealthAnalyticsCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.", + "canonical": true, + "file": "security_center_management.delete_security_health_analytics_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "DeleteSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_async", + "title": "SecurityCenterManagement simulateSecurityHealthAnalyticsCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a resource.", + "canonical": true, + "file": "security_center_management.simulate_security_health_analytics_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SimulateSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "custom_config", + "type": ".google.cloud.securitycentermanagement.v1.CustomConfig" + }, + { + "name": "resource", + "type": ".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "SimulateSecurityHealthAnalyticsCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_async", + "title": "SecurityCenterManagement listEffectiveEventThreatDetectionCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.", + "canonical": true, + "file": "security_center_management.list_effective_event_threat_detection_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEffectiveEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ListEffectiveEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_async", + "title": "SecurityCenterManagement getEffectiveEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Gets the effective Event Threat Detection custom module at the given level. The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.", + "canonical": true, + "file": "security_center_management.get_effective_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEffectiveEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "GetEffectiveEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_async", + "title": "SecurityCenterManagement listEventThreatDetectionCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Lists all Event Threat Detection custom modules for the given organization, folder, or project. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", + "canonical": true, + "file": "security_center_management.list_event_threat_detection_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ListEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_async", + "title": "SecurityCenterManagement listDescendantEventThreatDetectionCustomModules Sample", + "origin": "API_DEFINITION", + "description": " Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.", + "canonical": true, + "file": "security_center_management.list_descendant_event_threat_detection_custom_modules.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDescendantEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ListDescendantEventThreatDetectionCustomModules", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_async", + "title": "SecurityCenterManagement getEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Gets an Event Threat Detection custom module.", + "canonical": true, + "file": "security_center_management.get_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "GetEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_async", + "title": "SecurityCenterManagement createEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", + "canonical": true, + "file": "security_center_management.create_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "event_threat_detection_custom_module", + "type": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "CreateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_async", + "title": "SecurityCenterManagement updateEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.", + "canonical": true, + "file": "security_center_management.update_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "event_threat_detection_custom_module", + "type": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "UpdateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_async", + "title": "SecurityCenterManagement deleteEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Deletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.", + "canonical": true, + "file": "security_center_management.delete_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "DeleteEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_async", + "title": "SecurityCenterManagement validateEventThreatDetectionCustomModule Sample", + "origin": "API_DEFINITION", + "description": " Validates the given Event Threat Detection custom module.", + "canonical": true, + "file": "security_center_management.validate_event_threat_detection_custom_module.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ValidateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "raw_text", + "type": "TYPE_STRING" + }, + { + "name": "type", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ValidateEventThreatDetectionCustomModule", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_async", + "title": "SecurityCenterManagement getSecurityCenterService Sample", + "origin": "API_DEFINITION", + "description": " Gets service settings for the specified Security Command Center service.", + "canonical": true, + "file": "security_center_management.get_security_center_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSecurityCenterService", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "show_eligible_modules_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.SecurityCenterService", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "GetSecurityCenterService", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_async", + "title": "SecurityCenterManagement listSecurityCenterServices Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of all Security Command Center services for the given parent.", + "canonical": true, + "file": "security_center_management.list_security_center_services.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSecurityCenterServices", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "show_eligible_modules_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "ListSecurityCenterServices", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + }, + { + "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_async", + "title": "SecurityCenterManagement updateSecurityCenterService Sample", + "origin": "API_DEFINITION", + "description": " Updates a Security Command Center service using the given update mask.", + "canonical": true, + "file": "security_center_management.update_security_center_service.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSecurityCenterService", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService", + "async": true, + "parameters": [ + { + "name": "security_center_service", + "type": ".google.cloud.securitycentermanagement.v1.SecurityCenterService" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.securitycentermanagement.v1.SecurityCenterService", + "client": { + "shortName": "SecurityCenterManagementClient", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" + }, + "method": { + "shortName": "UpdateSecurityCenterService", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService", + "service": { + "shortName": "SecurityCenterManagement", + "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/index.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/index.ts new file mode 100644 index 00000000000..02f4d207e86 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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 SecurityCenterManagementClient = v1.SecurityCenterManagementClient; +type SecurityCenterManagementClient = v1.SecurityCenterManagementClient; +export {v1, SecurityCenterManagementClient}; +export default {v1, SecurityCenterManagementClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..ddde33f885e --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json @@ -0,0 +1,261 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.securitycentermanagement.v1", + "libraryPackage": "@google-cloud/securitycentermanagement", + "services": { + "SecurityCenterManagement": { + "clients": { + "grpc": { + "libraryClient": "SecurityCenterManagementClient", + "rpcs": { + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "methods": [ + "getEffectiveSecurityHealthAnalyticsCustomModule" + ] + }, + "GetSecurityHealthAnalyticsCustomModule": { + "methods": [ + "getSecurityHealthAnalyticsCustomModule" + ] + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "createSecurityHealthAnalyticsCustomModule" + ] + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "updateSecurityHealthAnalyticsCustomModule" + ] + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "methods": [ + "deleteSecurityHealthAnalyticsCustomModule" + ] + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "simulateSecurityHealthAnalyticsCustomModule" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "getEffectiveEventThreatDetectionCustomModule" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "getEventThreatDetectionCustomModule" + ] + }, + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "createEventThreatDetectionCustomModule" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "updateEventThreatDetectionCustomModule" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "deleteEventThreatDetectionCustomModule" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validateEventThreatDetectionCustomModule" + ] + }, + "GetSecurityCenterService": { + "methods": [ + "getSecurityCenterService" + ] + }, + "UpdateSecurityCenterService": { + "methods": [ + "updateSecurityCenterService" + ] + }, + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listEffectiveSecurityHealthAnalyticsCustomModules", + "listEffectiveSecurityHealthAnalyticsCustomModulesStream", + "listEffectiveSecurityHealthAnalyticsCustomModulesAsync" + ] + }, + "ListSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listSecurityHealthAnalyticsCustomModules", + "listSecurityHealthAnalyticsCustomModulesStream", + "listSecurityHealthAnalyticsCustomModulesAsync" + ] + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listDescendantSecurityHealthAnalyticsCustomModules", + "listDescendantSecurityHealthAnalyticsCustomModulesStream", + "listDescendantSecurityHealthAnalyticsCustomModulesAsync" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "listEffectiveEventThreatDetectionCustomModules", + "listEffectiveEventThreatDetectionCustomModulesStream", + "listEffectiveEventThreatDetectionCustomModulesAsync" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "listEventThreatDetectionCustomModules", + "listEventThreatDetectionCustomModulesStream", + "listEventThreatDetectionCustomModulesAsync" + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "listDescendantEventThreatDetectionCustomModules", + "listDescendantEventThreatDetectionCustomModulesStream", + "listDescendantEventThreatDetectionCustomModulesAsync" + ] + }, + "ListSecurityCenterServices": { + "methods": [ + "listSecurityCenterServices", + "listSecurityCenterServicesStream", + "listSecurityCenterServicesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "SecurityCenterManagementClient", + "rpcs": { + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "methods": [ + "getEffectiveSecurityHealthAnalyticsCustomModule" + ] + }, + "GetSecurityHealthAnalyticsCustomModule": { + "methods": [ + "getSecurityHealthAnalyticsCustomModule" + ] + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "createSecurityHealthAnalyticsCustomModule" + ] + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "updateSecurityHealthAnalyticsCustomModule" + ] + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "methods": [ + "deleteSecurityHealthAnalyticsCustomModule" + ] + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "methods": [ + "simulateSecurityHealthAnalyticsCustomModule" + ] + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "methods": [ + "getEffectiveEventThreatDetectionCustomModule" + ] + }, + "GetEventThreatDetectionCustomModule": { + "methods": [ + "getEventThreatDetectionCustomModule" + ] + }, + "CreateEventThreatDetectionCustomModule": { + "methods": [ + "createEventThreatDetectionCustomModule" + ] + }, + "UpdateEventThreatDetectionCustomModule": { + "methods": [ + "updateEventThreatDetectionCustomModule" + ] + }, + "DeleteEventThreatDetectionCustomModule": { + "methods": [ + "deleteEventThreatDetectionCustomModule" + ] + }, + "ValidateEventThreatDetectionCustomModule": { + "methods": [ + "validateEventThreatDetectionCustomModule" + ] + }, + "GetSecurityCenterService": { + "methods": [ + "getSecurityCenterService" + ] + }, + "UpdateSecurityCenterService": { + "methods": [ + "updateSecurityCenterService" + ] + }, + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listEffectiveSecurityHealthAnalyticsCustomModules", + "listEffectiveSecurityHealthAnalyticsCustomModulesStream", + "listEffectiveSecurityHealthAnalyticsCustomModulesAsync" + ] + }, + "ListSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listSecurityHealthAnalyticsCustomModules", + "listSecurityHealthAnalyticsCustomModulesStream", + "listSecurityHealthAnalyticsCustomModulesAsync" + ] + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "methods": [ + "listDescendantSecurityHealthAnalyticsCustomModules", + "listDescendantSecurityHealthAnalyticsCustomModulesStream", + "listDescendantSecurityHealthAnalyticsCustomModulesAsync" + ] + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "methods": [ + "listEffectiveEventThreatDetectionCustomModules", + "listEffectiveEventThreatDetectionCustomModulesStream", + "listEffectiveEventThreatDetectionCustomModulesAsync" + ] + }, + "ListEventThreatDetectionCustomModules": { + "methods": [ + "listEventThreatDetectionCustomModules", + "listEventThreatDetectionCustomModulesStream", + "listEventThreatDetectionCustomModulesAsync" + ] + }, + "ListDescendantEventThreatDetectionCustomModules": { + "methods": [ + "listDescendantEventThreatDetectionCustomModules", + "listDescendantEventThreatDetectionCustomModulesStream", + "listDescendantEventThreatDetectionCustomModulesAsync" + ] + }, + "ListSecurityCenterServices": { + "methods": [ + "listSecurityCenterServices", + "listSecurityCenterServicesStream", + "listSecurityCenterServicesAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/index.ts new file mode 100644 index 00000000000..0d5a600f88b --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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 {SecurityCenterManagementClient} from './security_center_management_client'; diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts new file mode 100644 index 00000000000..b255733ad37 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts @@ -0,0 +1,4154 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall, 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/security_center_management_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './security_center_management_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources + * @class + * @memberof v1 + */ +export class SecurityCenterManagementClient { + 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}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + securityCenterManagementStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of SecurityCenterManagementClient. + * + * @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 SecurityCenterManagementClient({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 SecurityCenterManagementClient; + 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 = 'securitycentermanagement.' + 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.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 = { + folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}' + ), + folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}' + ), + folderLocationEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}' + ), + folderLocationSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}' + ), + folderLocationServicePathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/locations/{location}/securityCenterServices/{service}' + ), + folderSourceFindingPathTemplate: new this._gaxModule.PathTemplate( + 'folders/{folder}/sources/{source}/findings/{finding}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}' + ), + organizationLocationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}' + ), + organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}' + ), + organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}' + ), + organizationLocationEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}' + ), + organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}' + ), + organizationLocationServicePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/securityCenterServices/{service}' + ), + organizationSourceFindingPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/sources/{source}/findings/{finding}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}' + ), + projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}' + ), + projectLocationEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}' + ), + projectLocationSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}' + ), + projectLocationServicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/securityCenterServices/{service}' + ), + projectSourceFindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/sources/{source}/findings/{finding}' + ), + }; + + // 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 = { + listEffectiveSecurityHealthAnalyticsCustomModules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'effectiveSecurityHealthAnalyticsCustomModules'), + listSecurityHealthAnalyticsCustomModules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'securityHealthAnalyticsCustomModules'), + listDescendantSecurityHealthAnalyticsCustomModules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'securityHealthAnalyticsCustomModules'), + listEffectiveEventThreatDetectionCustomModules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'effectiveEventThreatDetectionCustomModules'), + listEventThreatDetectionCustomModules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'eventThreatDetectionCustomModules'), + listDescendantEventThreatDetectionCustomModules: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'eventThreatDetectionCustomModules'), + listSecurityCenterServices: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'securityCenterServices') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.securitycentermanagement.v1.SecurityCenterManagement', 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.securityCenterManagementStub) { + return this.securityCenterManagementStub; + } + + // Put together the "service stub" for + // google.cloud.securitycentermanagement.v1.SecurityCenterManagement. + this.securityCenterManagementStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.securitycentermanagement.v1.SecurityCenterManagement') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.securitycentermanagement.v1.SecurityCenterManagement, + 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 securityCenterManagementStubMethods = + ['listEffectiveSecurityHealthAnalyticsCustomModules', 'getEffectiveSecurityHealthAnalyticsCustomModule', 'listSecurityHealthAnalyticsCustomModules', 'listDescendantSecurityHealthAnalyticsCustomModules', 'getSecurityHealthAnalyticsCustomModule', 'createSecurityHealthAnalyticsCustomModule', 'updateSecurityHealthAnalyticsCustomModule', 'deleteSecurityHealthAnalyticsCustomModule', 'simulateSecurityHealthAnalyticsCustomModule', 'listEffectiveEventThreatDetectionCustomModules', 'getEffectiveEventThreatDetectionCustomModule', 'listEventThreatDetectionCustomModules', 'listDescendantEventThreatDetectionCustomModules', 'getEventThreatDetectionCustomModule', 'createEventThreatDetectionCustomModule', 'updateEventThreatDetectionCustomModule', 'deleteEventThreatDetectionCustomModule', 'validateEventThreatDetectionCustomModule', 'getSecurityCenterService', 'listSecurityCenterServices', 'updateSecurityCenterService']; + for (const methodName of securityCenterManagementStubMethods) { + const callPromise = this.securityCenterManagementStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.securityCenterManagementStub; + } + + /** + * 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 'securitycentermanagement.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 'securitycentermanagement.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- +/** + * Gets details of a single + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The full resource name of the custom module, specified in one of + * the following formats: + * + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. + * 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/security_center_management.get_effective_security_health_analytics_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_async + */ + getEffectiveSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>; + getEffectiveSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getEffectiveSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getEffectiveSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getEffectiveSecurityHealthAnalyticsCustomModule(request, options, callback); + } +/** + * Retrieves a + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource, in the format + * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * 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/security_center_management.get_security_health_analytics_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_async + */ + getSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>; + getSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getSecurityHealthAnalyticsCustomModule(request, options, callback); + } +/** + * Creates a resident + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * at the scope of the given organization, folder, or project, and also + * creates inherited `SecurityHealthAnalyticsCustomModule` resources for all + * folders and projects that are descendants of the given parent. These + * modules are enabled by default. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the parent organization, folder, or project of the + * module, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule + * Required. The resource being created. + * @param {boolean} [request.validateOnly] + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * 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/security_center_management.create_security_health_analytics_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_async + */ + createSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>; + createSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + createSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + createSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.createSecurityHealthAnalyticsCustomModule(request, options, callback); + } +/** + * Updates the + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * under the given name based on the given update mask. Updating the + * enablement state is supported on both resident and inherited modules + * (though resident modules cannot have an enablement state of "inherited"). + * Updating the display name and custom configuration of a module is supported + * on resident modules only. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to update. The following values are valid: + * + * * `custom_config` + * * `enablement_state` + * + * If you omit this field or set it to the wildcard value `*`, then all + * eligible fields are updated. + * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule + * Required. The resource being updated. + * @param {boolean} [request.validateOnly] + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * 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/security_center_management.update_security_health_analytics_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_async + */ + updateSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>; + updateSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + updateSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + updateSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'security_health_analytics_custom_module.name': request.securityHealthAnalyticsCustomModule!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateSecurityHealthAnalyticsCustomModule(request, options, callback); + } +/** + * Deletes the specified + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * and all of its descendants in the resource hierarchy. This method is only + * supported for resident custom modules. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the SHA custom module, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * @param {boolean} [request.validateOnly] + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during deletion of the module + * + * Defaults to `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_async + */ + deleteSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>; + deleteSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + deleteSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + deleteSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.deleteSecurityHealthAnalyticsCustomModule(request, options, callback); + } +/** + * Simulates the result of using a + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * to check a resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The relative resource name of the organization, project, or + * folder. For more information about relative resource names, see [AIP-122: + * Resource names](https://google.aip.dev/122). Example: + * `organizations/{organization_id}`. + * @param {google.cloud.securitycentermanagement.v1.CustomConfig} request.customConfig + * Required. The custom configuration that you need to test. + * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} request.resource + * Required. Resource data to simulate custom module against. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse|SimulateSecurityHealthAnalyticsCustomModuleResponse}. + * 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/security_center_management.simulate_security_health_analytics_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_async + */ + simulateSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>; + simulateSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + simulateSecurityHealthAnalyticsCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + simulateSecurityHealthAnalyticsCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.simulateSecurityHealthAnalyticsCustomModule(request, options, callback); + } +/** + * Gets the effective Event Threat Detection custom module at the given level. + * + * The difference between an + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule} + * and an + * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} + * is that the fields for an `EffectiveEventThreatDetectionCustomModule` are + * computed from ancestors if needed. For example, the enablement state for an + * `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or + * `INHERITED`. In contrast, the enablement state for an + * `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` + * or `DISABLED`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. + * 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/security_center_management.get_effective_event_threat_detection_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_async + */ + getEffectiveEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>; + getEffectiveEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getEffectiveEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getEffectiveEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getEffectiveEventThreatDetectionCustomModule(request, options, callback); + } +/** + * Gets an Event Threat Detection custom module. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * 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/security_center_management.get_event_threat_detection_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_async + */ + getEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>; + getEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + getEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getEventThreatDetectionCustomModule(request, options, callback); + } +/** + * Creates a resident Event Threat Detection custom module at the scope of the + * given organization, folder, or project, and creates inherited custom + * modules for all descendants of the given parent. These modules are enabled + * by default. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent for the module, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule + * Required. The module to create. The + * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name|EventThreatDetectionCustomModule.name} + * field is ignored; Security Command Center generates the name. + * @param {boolean} [request.validateOnly] + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * 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/security_center_management.create_event_threat_detection_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_async + */ + createEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>; + createEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + createEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + createEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.createEventThreatDetectionCustomModule(request, options, callback); + } +/** + * Updates the Event Threat Detection custom module with the given name based + * on the given update mask. Updating the enablement state is supported for + * both resident and inherited modules (though resident modules cannot have an + * enablement state of "inherited"). Updating the display name or + * configuration of a module is supported for resident modules only. The type + * of a module cannot be changed. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to update. If omitted, then all fields are updated. + * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule + * Required. The module being updated. + * @param {boolean} [request.validateOnly] + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * 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/security_center_management.update_event_threat_detection_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_async + */ + updateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>; + updateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + updateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + updateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, + protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'event_threat_detection_custom_module.name': request.eventThreatDetectionCustomModule!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateEventThreatDetectionCustomModule(request, options, callback); + } +/** + * Deletes the specified Event Threat Detection custom module and all of its + * descendants in the resource hierarchy. This method is only supported for + * resident custom modules. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * @param {boolean} [request.validateOnly] + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_async + */ + deleteEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>; + deleteEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + deleteEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + deleteEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.deleteEventThreatDetectionCustomModule(request, options, callback); + } +/** + * Validates the given Event Threat Detection custom module. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the parent to validate the custom modules under, + * in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * @param {string} request.rawText + * Required. The raw text of the module's contents. Used to generate error + * messages. + * @param {string} request.type + * Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse|ValidateEventThreatDetectionCustomModuleResponse}. + * 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/security_center_management.validate_event_threat_detection_custom_module.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_async + */ + validateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>; + validateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + validateEventThreatDetectionCustomModule( + request: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): void; + validateEventThreatDetectionCustomModule( + request?: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, + protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.validateEventThreatDetectionCustomModule(request, options, callback); + } +/** + * Gets service settings for the specified Security Command Center service. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Security Command Center service to retrieve, in one of the + * following formats: + * + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * + * The following values are valid for `{service}`: + * + * * `container-threat-detection` + * * `event-threat-detection` + * * `security-health-analytics` + * * `vm-threat-detection` + * * `web-security-scanner` + * @param {boolean} request.showEligibleModulesOnly + * Set to `true` to show only modules that are in scope. By default, all + * modules are shown. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. + * 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/security_center_management.get_security_center_service.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_async + */ + getSecurityCenterService( + request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|undefined, {}|undefined + ]>; + getSecurityCenterService( + request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>): void; + getSecurityCenterService( + request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>): void; + getSecurityCenterService( + request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.getSecurityCenterService(request, options, callback); + } +/** + * Updates a Security Command Center service using the given update mask. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} request.securityCenterService + * Required. The updated service. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to update. Accepts the following values: + * + * * `intended_enablement_state` + * * `modules` + * + * If omitted, then all eligible fields are updated. + * @param {boolean} [request.validateOnly] + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no service will be updated. An `OK` response indicates that + * the request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to update the service could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during update of the service + * + * Defaults to `false`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. + * 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/security_center_management.update_security_center_service.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_async + */ + updateSecurityCenterService( + request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|undefined, {}|undefined + ]>; + updateSecurityCenterService( + request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>): void; + updateSecurityCenterService( + request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, + callback: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>): void; + updateSecurityCenterService( + request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, + protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'security_center_service.name': request.securityCenterService!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateSecurityCenterService(request, options, callback); + } + + /** + * Returns a list of all + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule} + * resources for the given parent. This includes resident modules defined at + * the scope of the parent, and inherited modules, inherited from ancestor + * organizations, folders, and projects (no descendants). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. + * 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 `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` + * 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. + */ + listEffectiveSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + ]>; + listEffectiveSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>): void; + listEffectiveSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>): void; + listEffectiveSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>, + callback?: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listEffectiveSecurityHealthAnalyticsCustomModules(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. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule} 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 `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` + * 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. + */ + listEffectiveSecurityHealthAnalyticsCustomModulesStream( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + 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['listEffectiveSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream( + this.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEffectiveSecurityHealthAnalyticsCustomModules`, 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. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. 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/security_center_management.list_effective_security_health_analytics_custom_modules.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_async + */ + listEffectiveSecurityHealthAnalyticsCustomModulesAsync( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, + 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['listEffectiveSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate( + this.innerApiCalls['listEffectiveSecurityHealthAnalyticsCustomModules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of all + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * resources for the given parent. This includes resident modules defined at + * the scope of the parent, and inherited modules, inherited from ancestor + * organizations, folders, and projects (no descendants). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * 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 `listSecurityHealthAnalyticsCustomModulesAsync()` + * 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. + */ + listSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse + ]>; + listSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; + listSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; + listSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>, + callback?: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listSecurityHealthAnalyticsCustomModules(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. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} 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 `listSecurityHealthAnalyticsCustomModulesAsync()` + * 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. + */ + listSecurityHealthAnalyticsCustomModulesStream( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + 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['listSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream( + this.innerApiCalls.listSecurityHealthAnalyticsCustomModules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listSecurityHealthAnalyticsCustomModules`, 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. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. 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/security_center_management.list_security_health_analytics_custom_modules.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_async + */ + listSecurityHealthAnalyticsCustomModulesAsync( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, + 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['listSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate( + this.innerApiCalls['listSecurityHealthAnalyticsCustomModules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of all resident + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * resources under the given organization, folder, or project and all of its + * descendants. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. + * 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 `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` + * 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. + */ + listDescendantSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + ]>; + listDescendantSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; + listDescendantSecurityHealthAnalyticsCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; + listDescendantSecurityHealthAnalyticsCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>, + callback?: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listDescendantSecurityHealthAnalyticsCustomModules(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. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} 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 `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` + * 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. + */ + listDescendantSecurityHealthAnalyticsCustomModulesStream( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + 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['listDescendantSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream( + this.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDescendantSecurityHealthAnalyticsCustomModules`, 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. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. 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/security_center_management.list_descendant_security_health_analytics_custom_modules.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_async + */ + listDescendantSecurityHealthAnalyticsCustomModulesAsync( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, + 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['listDescendantSecurityHealthAnalyticsCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate( + this.innerApiCalls['listDescendantSecurityHealthAnalyticsCustomModules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all effective Event Threat Detection custom modules for the + * given parent. This includes resident modules defined at the scope of the + * parent along with modules inherited from its ancestors. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. + * 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 `listEffectiveEventThreatDetectionCustomModulesAsync()` + * 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. + */ + listEffectiveEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse + ]>; + listEffectiveEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>): void; + listEffectiveEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>): void; + listEffectiveEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>, + callback?: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listEffectiveEventThreatDetectionCustomModules(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. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule} 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 `listEffectiveEventThreatDetectionCustomModulesAsync()` + * 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. + */ + listEffectiveEventThreatDetectionCustomModulesStream( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + 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['listEffectiveEventThreatDetectionCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream( + this.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEffectiveEventThreatDetectionCustomModules`, 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. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. 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/security_center_management.list_effective_event_threat_detection_custom_modules.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_async + */ + listEffectiveEventThreatDetectionCustomModulesAsync( + request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, + 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['listEffectiveEventThreatDetectionCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate( + this.innerApiCalls['listEffectiveEventThreatDetectionCustomModules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all Event Threat Detection custom modules for the given organization, + * folder, or project. This includes resident modules defined at the scope of + * the parent along with modules inherited from ancestors. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 modules will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * 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 `listEventThreatDetectionCustomModulesAsync()` + * 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. + */ + listEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse + ]>; + listEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; + listEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; + listEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>, + callback?: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listEventThreatDetectionCustomModules(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. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 modules will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} 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 `listEventThreatDetectionCustomModulesAsync()` + * 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. + */ + listEventThreatDetectionCustomModulesStream( + request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + 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['listEventThreatDetectionCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEventThreatDetectionCustomModules.createStream( + this.innerApiCalls.listEventThreatDetectionCustomModules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEventThreatDetectionCustomModules`, 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. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 modules will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. 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/security_center_management.list_event_threat_detection_custom_modules.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_async + */ + listEventThreatDetectionCustomModulesAsync( + request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, + 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['listEventThreatDetectionCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate( + this.innerApiCalls['listEventThreatDetectionCustomModules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all resident Event Threat Detection custom modules for the given + * organization, folder, or project and its descendants. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. + * 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 `listDescendantEventThreatDetectionCustomModulesAsync()` + * 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. + */ + listDescendantEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse + ]>; + listDescendantEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; + listDescendantEventThreatDetectionCustomModules( + request: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; + listDescendantEventThreatDetectionCustomModules( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>, + callback?: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listDescendantEventThreatDetectionCustomModules(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. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} 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 `listDescendantEventThreatDetectionCustomModulesAsync()` + * 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. + */ + listDescendantEventThreatDetectionCustomModulesStream( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + 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['listDescendantEventThreatDetectionCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream( + this.innerApiCalls.listDescendantEventThreatDetectionCustomModules as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDescendantEventThreatDetectionCustomModules`, 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. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of modules to return. The service may return + * fewer than this value. If unspecified, at most 10 configs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. 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/security_center_management.list_descendant_event_threat_detection_custom_modules.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_async + */ + listDescendantEventThreatDetectionCustomModulesAsync( + request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, + 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['listDescendantEventThreatDetectionCustomModules']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate( + this.innerApiCalls['listDescendantEventThreatDetectionCustomModules'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of all Security Command Center services for the given + * parent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the parent to list Security Command Center services, + * in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {boolean} request.showEligibleModulesOnly + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. + * 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 `listSecurityCenterServicesAsync()` + * 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. + */ + listSecurityCenterServices( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[], + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse + ]>; + listSecurityCenterServices( + request: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>): void; + listSecurityCenterServices( + request: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + callback: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>): void; + listSecurityCenterServices( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>, + callback?: PaginationCallback< + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>): + Promise<[ + protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[], + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest|null, + protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listSecurityCenterServices(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 name of the parent to list Security Command Center services, + * in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {boolean} request.showEligibleModulesOnly + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. + * @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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService} 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 `listSecurityCenterServicesAsync()` + * 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. + */ + listSecurityCenterServicesStream( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + 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['listSecurityCenterServices']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSecurityCenterServices.createStream( + this.innerApiCalls.listSecurityCenterServices as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listSecurityCenterServices`, 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 name of the parent to list Security Command Center services, + * in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` + * @param {number} [request.pageSize] + * Optional. The maximum number of results to return in a single response. + * Default is 10, minimum is 1, maximum is 1000. + * @param {string} [request.pageToken] + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. + * @param {boolean} request.showEligibleModulesOnly + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. + * @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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. 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/security_center_management.list_security_center_services.js + * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_async + */ + listSecurityCenterServicesAsync( + request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, + 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['listSecurityCenterServices']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listSecurityCenterServices.asyncIterate( + this.innerApiCalls['listSecurityCenterServices'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified folderLocationEffectiveEventThreatDetectionCustomModule resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} effective_event_threat_detection_custom_module + * @returns {string} Resource name string. + */ + folderLocationEffectiveEventThreatDetectionCustomModulePath(folder:string,location:string,effectiveEventThreatDetectionCustomModule:string) { + return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render({ + folder: folder, + location: location, + effective_event_threat_detection_custom_module: effectiveEventThreatDetectionCustomModule, + }); + } + + /** + * Parse the folder from FolderLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} folderLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing folder_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(folderLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(folderLocationEffectiveEventThreatDetectionCustomModuleName).folder; + } + + /** + * Parse the location from FolderLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} folderLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing folder_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(folderLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(folderLocationEffectiveEventThreatDetectionCustomModuleName).location; + } + + /** + * Parse the effective_event_threat_detection_custom_module from FolderLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} folderLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing folder_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the effective_event_threat_detection_custom_module. + */ + matchEffectiveEventThreatDetectionCustomModuleFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(folderLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(folderLocationEffectiveEventThreatDetectionCustomModuleName).effective_event_threat_detection_custom_module; + } + + /** + * Return a fully-qualified folderLocationEffectiveSecurityHealthAnalyticsCustomModule resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} effective_security_health_analytics_custom_module + * @returns {string} Resource name string. + */ + folderLocationEffectiveSecurityHealthAnalyticsCustomModulePath(folder:string,location:string,effectiveSecurityHealthAnalyticsCustomModule:string) { + return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render({ + folder: folder, + location: location, + effective_security_health_analytics_custom_module: effectiveSecurityHealthAnalyticsCustomModule, + }); + } + + /** + * Parse the folder from FolderLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing folder_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName).folder; + } + + /** + * Parse the location from FolderLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing folder_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName).location; + } + + /** + * Parse the effective_security_health_analytics_custom_module from FolderLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing folder_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the effective_security_health_analytics_custom_module. + */ + matchEffectiveSecurityHealthAnalyticsCustomModuleFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName).effective_security_health_analytics_custom_module; + } + + /** + * Return a fully-qualified folderLocationEventThreatDetectionCustomModule resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} event_threat_detection_custom_module + * @returns {string} Resource name string. + */ + folderLocationEventThreatDetectionCustomModulePath(folder:string,location:string,eventThreatDetectionCustomModule:string) { + return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.render({ + folder: folder, + location: location, + event_threat_detection_custom_module: eventThreatDetectionCustomModule, + }); + } + + /** + * Parse the folder from FolderLocationEventThreatDetectionCustomModule resource. + * + * @param {string} folderLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing folder_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationEventThreatDetectionCustomModuleName(folderLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match(folderLocationEventThreatDetectionCustomModuleName).folder; + } + + /** + * Parse the location from FolderLocationEventThreatDetectionCustomModule resource. + * + * @param {string} folderLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing folder_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationEventThreatDetectionCustomModuleName(folderLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match(folderLocationEventThreatDetectionCustomModuleName).location; + } + + /** + * Parse the event_threat_detection_custom_module from FolderLocationEventThreatDetectionCustomModule resource. + * + * @param {string} folderLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing folder_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the event_threat_detection_custom_module. + */ + matchEventThreatDetectionCustomModuleFromFolderLocationEventThreatDetectionCustomModuleName(folderLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match(folderLocationEventThreatDetectionCustomModuleName).event_threat_detection_custom_module; + } + + /** + * Return a fully-qualified folderLocationSecurityHealthAnalyticsCustomModule resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} security_health_analytics_custom_module + * @returns {string} Resource name string. + */ + folderLocationSecurityHealthAnalyticsCustomModulePath(folder:string,location:string,securityHealthAnalyticsCustomModule:string) { + return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.render({ + folder: folder, + location: location, + security_health_analytics_custom_module: securityHealthAnalyticsCustomModule, + }); + } + + /** + * Parse the folder from FolderLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} folderLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing folder_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationSecurityHealthAnalyticsCustomModuleName(folderLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationSecurityHealthAnalyticsCustomModuleName).folder; + } + + /** + * Parse the location from FolderLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} folderLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing folder_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationSecurityHealthAnalyticsCustomModuleName(folderLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationSecurityHealthAnalyticsCustomModuleName).location; + } + + /** + * Parse the security_health_analytics_custom_module from FolderLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} folderLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing folder_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the security_health_analytics_custom_module. + */ + matchSecurityHealthAnalyticsCustomModuleFromFolderLocationSecurityHealthAnalyticsCustomModuleName(folderLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationSecurityHealthAnalyticsCustomModuleName).security_health_analytics_custom_module; + } + + /** + * Return a fully-qualified folderLocationService resource name string. + * + * @param {string} folder + * @param {string} location + * @param {string} service + * @returns {string} Resource name string. + */ + folderLocationServicePath(folder:string,location:string,service:string) { + return this.pathTemplates.folderLocationServicePathTemplate.render({ + folder: folder, + location: location, + service: service, + }); + } + + /** + * Parse the folder from FolderLocationService resource. + * + * @param {string} folderLocationServiceName + * A fully-qualified path representing folder_location_service resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderLocationServiceName(folderLocationServiceName: string) { + return this.pathTemplates.folderLocationServicePathTemplate.match(folderLocationServiceName).folder; + } + + /** + * Parse the location from FolderLocationService resource. + * + * @param {string} folderLocationServiceName + * A fully-qualified path representing folder_location_service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFolderLocationServiceName(folderLocationServiceName: string) { + return this.pathTemplates.folderLocationServicePathTemplate.match(folderLocationServiceName).location; + } + + /** + * Parse the service from FolderLocationService resource. + * + * @param {string} folderLocationServiceName + * A fully-qualified path representing folder_location_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromFolderLocationServiceName(folderLocationServiceName: string) { + return this.pathTemplates.folderLocationServicePathTemplate.match(folderLocationServiceName).service; + } + + /** + * Return a fully-qualified folderSourceFinding resource name string. + * + * @param {string} folder + * @param {string} source + * @param {string} finding + * @returns {string} Resource name string. + */ + folderSourceFindingPath(folder:string,source:string,finding:string) { + return this.pathTemplates.folderSourceFindingPathTemplate.render({ + folder: folder, + source: source, + finding: finding, + }); + } + + /** + * Parse the folder from FolderSourceFinding resource. + * + * @param {string} folderSourceFindingName + * A fully-qualified path representing folder_source_finding resource. + * @returns {string} A string representing the folder. + */ + matchFolderFromFolderSourceFindingName(folderSourceFindingName: string) { + return this.pathTemplates.folderSourceFindingPathTemplate.match(folderSourceFindingName).folder; + } + + /** + * Parse the source from FolderSourceFinding resource. + * + * @param {string} folderSourceFindingName + * A fully-qualified path representing folder_source_finding resource. + * @returns {string} A string representing the source. + */ + matchSourceFromFolderSourceFindingName(folderSourceFindingName: string) { + return this.pathTemplates.folderSourceFindingPathTemplate.match(folderSourceFindingName).source; + } + + /** + * Parse the finding from FolderSourceFinding resource. + * + * @param {string} folderSourceFindingName + * A fully-qualified path representing folder_source_finding resource. + * @returns {string} A string representing the finding. + */ + matchFindingFromFolderSourceFindingName(folderSourceFindingName: string) { + return this.pathTemplates.folderSourceFindingPathTemplate.match(folderSourceFindingName).finding; + } + + /** + * 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 organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization:string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; + } + + /** + * Return a fully-qualified organizationLocation resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationPath(organization:string,location:string) { + return this.pathTemplates.organizationLocationPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; + } + + /** + * Parse the location from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; + } + + /** + * Return a fully-qualified organizationLocationEffectiveEventThreatDetectionCustomModule resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} effective_event_threat_detection_custom_module + * @returns {string} Resource name string. + */ + organizationLocationEffectiveEventThreatDetectionCustomModulePath(organization:string,location:string,effectiveEventThreatDetectionCustomModule:string) { + return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render({ + organization: organization, + location: location, + effective_event_threat_detection_custom_module: effectiveEventThreatDetectionCustomModule, + }); + } + + /** + * Parse the organization from OrganizationLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} organizationLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing organization_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(organizationLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEffectiveEventThreatDetectionCustomModuleName).organization; + } + + /** + * Parse the location from OrganizationLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} organizationLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing organization_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(organizationLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEffectiveEventThreatDetectionCustomModuleName).location; + } + + /** + * Parse the effective_event_threat_detection_custom_module from OrganizationLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} organizationLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing organization_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the effective_event_threat_detection_custom_module. + */ + matchEffectiveEventThreatDetectionCustomModuleFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(organizationLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEffectiveEventThreatDetectionCustomModuleName).effective_event_threat_detection_custom_module; + } + + /** + * Return a fully-qualified organizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} effective_security_health_analytics_custom_module + * @returns {string} Resource name string. + */ + organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePath(organization:string,location:string,effectiveSecurityHealthAnalyticsCustomModule:string) { + return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render({ + organization: organization, + location: location, + effective_security_health_analytics_custom_module: effectiveSecurityHealthAnalyticsCustomModule, + }); + } + + /** + * Parse the organization from OrganizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing organization_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName).organization; + } + + /** + * Parse the location from OrganizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing organization_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName).location; + } + + /** + * Parse the effective_security_health_analytics_custom_module from OrganizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing organization_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the effective_security_health_analytics_custom_module. + */ + matchEffectiveSecurityHealthAnalyticsCustomModuleFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName).effective_security_health_analytics_custom_module; + } + + /** + * Return a fully-qualified organizationLocationEventThreatDetectionCustomModule resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} event_threat_detection_custom_module + * @returns {string} Resource name string. + */ + organizationLocationEventThreatDetectionCustomModulePath(organization:string,location:string,eventThreatDetectionCustomModule:string) { + return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.render({ + organization: organization, + location: location, + event_threat_detection_custom_module: eventThreatDetectionCustomModule, + }); + } + + /** + * Parse the organization from OrganizationLocationEventThreatDetectionCustomModule resource. + * + * @param {string} organizationLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing organization_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationEventThreatDetectionCustomModuleName(organizationLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEventThreatDetectionCustomModuleName).organization; + } + + /** + * Parse the location from OrganizationLocationEventThreatDetectionCustomModule resource. + * + * @param {string} organizationLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing organization_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationEventThreatDetectionCustomModuleName(organizationLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEventThreatDetectionCustomModuleName).location; + } + + /** + * Parse the event_threat_detection_custom_module from OrganizationLocationEventThreatDetectionCustomModule resource. + * + * @param {string} organizationLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing organization_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the event_threat_detection_custom_module. + */ + matchEventThreatDetectionCustomModuleFromOrganizationLocationEventThreatDetectionCustomModuleName(organizationLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEventThreatDetectionCustomModuleName).event_threat_detection_custom_module; + } + + /** + * Return a fully-qualified organizationLocationSecurityHealthAnalyticsCustomModule resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} security_health_analytics_custom_module + * @returns {string} Resource name string. + */ + organizationLocationSecurityHealthAnalyticsCustomModulePath(organization:string,location:string,securityHealthAnalyticsCustomModule:string) { + return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.render({ + organization: organization, + location: location, + security_health_analytics_custom_module: securityHealthAnalyticsCustomModule, + }); + } + + /** + * Parse the organization from OrganizationLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} organizationLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing organization_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(organizationLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationSecurityHealthAnalyticsCustomModuleName).organization; + } + + /** + * Parse the location from OrganizationLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} organizationLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing organization_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(organizationLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationSecurityHealthAnalyticsCustomModuleName).location; + } + + /** + * Parse the security_health_analytics_custom_module from OrganizationLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} organizationLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing organization_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the security_health_analytics_custom_module. + */ + matchSecurityHealthAnalyticsCustomModuleFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(organizationLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationSecurityHealthAnalyticsCustomModuleName).security_health_analytics_custom_module; + } + + /** + * Return a fully-qualified organizationLocationService resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} service + * @returns {string} Resource name string. + */ + organizationLocationServicePath(organization:string,location:string,service:string) { + return this.pathTemplates.organizationLocationServicePathTemplate.render({ + organization: organization, + location: location, + service: service, + }); + } + + /** + * Parse the organization from OrganizationLocationService resource. + * + * @param {string} organizationLocationServiceName + * A fully-qualified path representing organization_location_service resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationServiceName(organizationLocationServiceName: string) { + return this.pathTemplates.organizationLocationServicePathTemplate.match(organizationLocationServiceName).organization; + } + + /** + * Parse the location from OrganizationLocationService resource. + * + * @param {string} organizationLocationServiceName + * A fully-qualified path representing organization_location_service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationServiceName(organizationLocationServiceName: string) { + return this.pathTemplates.organizationLocationServicePathTemplate.match(organizationLocationServiceName).location; + } + + /** + * Parse the service from OrganizationLocationService resource. + * + * @param {string} organizationLocationServiceName + * A fully-qualified path representing organization_location_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromOrganizationLocationServiceName(organizationLocationServiceName: string) { + return this.pathTemplates.organizationLocationServicePathTemplate.match(organizationLocationServiceName).service; + } + + /** + * Return a fully-qualified organizationSourceFinding resource name string. + * + * @param {string} organization + * @param {string} source + * @param {string} finding + * @returns {string} Resource name string. + */ + organizationSourceFindingPath(organization:string,source:string,finding:string) { + return this.pathTemplates.organizationSourceFindingPathTemplate.render({ + organization: organization, + source: source, + finding: finding, + }); + } + + /** + * Parse the organization from OrganizationSourceFinding resource. + * + * @param {string} organizationSourceFindingName + * A fully-qualified path representing organization_source_finding resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationSourceFindingName(organizationSourceFindingName: string) { + return this.pathTemplates.organizationSourceFindingPathTemplate.match(organizationSourceFindingName).organization; + } + + /** + * Parse the source from OrganizationSourceFinding resource. + * + * @param {string} organizationSourceFindingName + * A fully-qualified path representing organization_source_finding resource. + * @returns {string} A string representing the source. + */ + matchSourceFromOrganizationSourceFindingName(organizationSourceFindingName: string) { + return this.pathTemplates.organizationSourceFindingPathTemplate.match(organizationSourceFindingName).source; + } + + /** + * Parse the finding from OrganizationSourceFinding resource. + * + * @param {string} organizationSourceFindingName + * A fully-qualified path representing organization_source_finding resource. + * @returns {string} A string representing the finding. + */ + matchFindingFromOrganizationSourceFindingName(organizationSourceFindingName: string) { + return this.pathTemplates.organizationSourceFindingPathTemplate.match(organizationSourceFindingName).finding; + } + + /** + * 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 projectLocationEffectiveEventThreatDetectionCustomModule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} effective_event_threat_detection_custom_module + * @returns {string} Resource name string. + */ + projectLocationEffectiveEventThreatDetectionCustomModulePath(project:string,location:string,effectiveEventThreatDetectionCustomModule:string) { + return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render({ + project: project, + location: location, + effective_event_threat_detection_custom_module: effectiveEventThreatDetectionCustomModule, + }); + } + + /** + * Parse the project from ProjectLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} projectLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing project_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(projectLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(projectLocationEffectiveEventThreatDetectionCustomModuleName).project; + } + + /** + * Parse the location from ProjectLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} projectLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing project_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(projectLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(projectLocationEffectiveEventThreatDetectionCustomModuleName).location; + } + + /** + * Parse the effective_event_threat_detection_custom_module from ProjectLocationEffectiveEventThreatDetectionCustomModule resource. + * + * @param {string} projectLocationEffectiveEventThreatDetectionCustomModuleName + * A fully-qualified path representing project_location_effective_event_threat_detection_custom_module resource. + * @returns {string} A string representing the effective_event_threat_detection_custom_module. + */ + matchEffectiveEventThreatDetectionCustomModuleFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(projectLocationEffectiveEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(projectLocationEffectiveEventThreatDetectionCustomModuleName).effective_event_threat_detection_custom_module; + } + + /** + * Return a fully-qualified projectLocationEffectiveSecurityHealthAnalyticsCustomModule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} effective_security_health_analytics_custom_module + * @returns {string} Resource name string. + */ + projectLocationEffectiveSecurityHealthAnalyticsCustomModulePath(project:string,location:string,effectiveSecurityHealthAnalyticsCustomModule:string) { + return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render({ + project: project, + location: location, + effective_security_health_analytics_custom_module: effectiveSecurityHealthAnalyticsCustomModule, + }); + } + + /** + * Parse the project from ProjectLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing project_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName).project; + } + + /** + * Parse the location from ProjectLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing project_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName).location; + } + + /** + * Parse the effective_security_health_analytics_custom_module from ProjectLocationEffectiveSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing project_location_effective_security_health_analytics_custom_module resource. + * @returns {string} A string representing the effective_security_health_analytics_custom_module. + */ + matchEffectiveSecurityHealthAnalyticsCustomModuleFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName).effective_security_health_analytics_custom_module; + } + + /** + * Return a fully-qualified projectLocationEventThreatDetectionCustomModule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} event_threat_detection_custom_module + * @returns {string} Resource name string. + */ + projectLocationEventThreatDetectionCustomModulePath(project:string,location:string,eventThreatDetectionCustomModule:string) { + return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.render({ + project: project, + location: location, + event_threat_detection_custom_module: eventThreatDetectionCustomModule, + }); + } + + /** + * Parse the project from ProjectLocationEventThreatDetectionCustomModule resource. + * + * @param {string} projectLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing project_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEventThreatDetectionCustomModuleName(projectLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match(projectLocationEventThreatDetectionCustomModuleName).project; + } + + /** + * Parse the location from ProjectLocationEventThreatDetectionCustomModule resource. + * + * @param {string} projectLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing project_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEventThreatDetectionCustomModuleName(projectLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match(projectLocationEventThreatDetectionCustomModuleName).location; + } + + /** + * Parse the event_threat_detection_custom_module from ProjectLocationEventThreatDetectionCustomModule resource. + * + * @param {string} projectLocationEventThreatDetectionCustomModuleName + * A fully-qualified path representing project_location_event_threat_detection_custom_module resource. + * @returns {string} A string representing the event_threat_detection_custom_module. + */ + matchEventThreatDetectionCustomModuleFromProjectLocationEventThreatDetectionCustomModuleName(projectLocationEventThreatDetectionCustomModuleName: string) { + return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match(projectLocationEventThreatDetectionCustomModuleName).event_threat_detection_custom_module; + } + + /** + * Return a fully-qualified projectLocationSecurityHealthAnalyticsCustomModule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} security_health_analytics_custom_module + * @returns {string} Resource name string. + */ + projectLocationSecurityHealthAnalyticsCustomModulePath(project:string,location:string,securityHealthAnalyticsCustomModule:string) { + return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.render({ + project: project, + location: location, + security_health_analytics_custom_module: securityHealthAnalyticsCustomModule, + }); + } + + /** + * Parse the project from ProjectLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} projectLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing project_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSecurityHealthAnalyticsCustomModuleName(projectLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationSecurityHealthAnalyticsCustomModuleName).project; + } + + /** + * Parse the location from ProjectLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} projectLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing project_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSecurityHealthAnalyticsCustomModuleName(projectLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationSecurityHealthAnalyticsCustomModuleName).location; + } + + /** + * Parse the security_health_analytics_custom_module from ProjectLocationSecurityHealthAnalyticsCustomModule resource. + * + * @param {string} projectLocationSecurityHealthAnalyticsCustomModuleName + * A fully-qualified path representing project_location_security_health_analytics_custom_module resource. + * @returns {string} A string representing the security_health_analytics_custom_module. + */ + matchSecurityHealthAnalyticsCustomModuleFromProjectLocationSecurityHealthAnalyticsCustomModuleName(projectLocationSecurityHealthAnalyticsCustomModuleName: string) { + return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationSecurityHealthAnalyticsCustomModuleName).security_health_analytics_custom_module; + } + + /** + * Return a fully-qualified projectLocationService resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} service + * @returns {string} Resource name string. + */ + projectLocationServicePath(project:string,location:string,service:string) { + return this.pathTemplates.projectLocationServicePathTemplate.render({ + project: project, + location: location, + service: service, + }); + } + + /** + * Parse the project from ProjectLocationService resource. + * + * @param {string} projectLocationServiceName + * A fully-qualified path representing project_location_service resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationServiceName(projectLocationServiceName: string) { + return this.pathTemplates.projectLocationServicePathTemplate.match(projectLocationServiceName).project; + } + + /** + * Parse the location from ProjectLocationService resource. + * + * @param {string} projectLocationServiceName + * A fully-qualified path representing project_location_service resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationServiceName(projectLocationServiceName: string) { + return this.pathTemplates.projectLocationServicePathTemplate.match(projectLocationServiceName).location; + } + + /** + * Parse the service from ProjectLocationService resource. + * + * @param {string} projectLocationServiceName + * A fully-qualified path representing project_location_service resource. + * @returns {string} A string representing the service. + */ + matchServiceFromProjectLocationServiceName(projectLocationServiceName: string) { + return this.pathTemplates.projectLocationServicePathTemplate.match(projectLocationServiceName).service; + } + + /** + * Return a fully-qualified projectSourceFinding resource name string. + * + * @param {string} project + * @param {string} source + * @param {string} finding + * @returns {string} Resource name string. + */ + projectSourceFindingPath(project:string,source:string,finding:string) { + return this.pathTemplates.projectSourceFindingPathTemplate.render({ + project: project, + source: source, + finding: finding, + }); + } + + /** + * Parse the project from ProjectSourceFinding resource. + * + * @param {string} projectSourceFindingName + * A fully-qualified path representing project_source_finding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectSourceFindingName(projectSourceFindingName: string) { + return this.pathTemplates.projectSourceFindingPathTemplate.match(projectSourceFindingName).project; + } + + /** + * Parse the source from ProjectSourceFinding resource. + * + * @param {string} projectSourceFindingName + * A fully-qualified path representing project_source_finding resource. + * @returns {string} A string representing the source. + */ + matchSourceFromProjectSourceFindingName(projectSourceFindingName: string) { + return this.pathTemplates.projectSourceFindingPathTemplate.match(projectSourceFindingName).source; + } + + /** + * Parse the finding from ProjectSourceFinding resource. + * + * @param {string} projectSourceFindingName + * A fully-qualified path representing project_source_finding resource. + * @returns {string} A string representing the finding. + */ + matchFindingFromProjectSourceFindingName(projectSourceFindingName: string) { + return this.pathTemplates.projectSourceFindingPathTemplate.match(projectSourceFindingName).finding; + } + + /** + * 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.securityCenterManagementStub && !this._terminated) { + return this.securityCenterManagementStub.then(stub => { + this._terminated = true; + stub.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json new file mode 100644 index 00000000000..43150ddc2b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json @@ -0,0 +1,128 @@ +{ + "interfaces": { + "google.cloud.securitycentermanagement.v1.SecurityCenterManagement": { + "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": { + "ListEffectiveSecurityHealthAnalyticsCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetEffectiveSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListSecurityHealthAnalyticsCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListDescendantSecurityHealthAnalyticsCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SimulateSecurityHealthAnalyticsCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListEffectiveEventThreatDetectionCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetEffectiveEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListEventThreatDetectionCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListDescendantEventThreatDetectionCustomModules": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ValidateEventThreatDetectionCustomModule": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetSecurityCenterService": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSecurityCenterServices": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSecurityCenterService": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json new file mode 100644 index 00000000000..df6fdefe685 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/securitycentermanagement/v1/security_center_management.proto" +] diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..3ed7b49ec97 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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 securitycentermanagement = require('@google-cloud/securitycentermanagement'); + +function main() { + const securityCenterManagementClient = new securitycentermanagement.SecurityCenterManagementClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..610c458b730 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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 {SecurityCenterManagementClient} from '@google-cloud/securitycentermanagement'; + +// check that the client class type name can be used +function doStuffWithSecurityCenterManagementClient(client: SecurityCenterManagementClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const securityCenterManagementClient = new SecurityCenterManagementClient(); + doStuffWithSecurityCenterManagementClient(securityCenterManagementClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/install.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts new file mode 100644 index 00000000000..07208b295f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts @@ -0,0 +1,4633 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 securitycentermanagementModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, 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 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.SecurityCenterManagementClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'securitycentermanagement.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient(); + 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 = securitycentermanagementModule.v1.SecurityCenterManagementClient.servicePath; + assert.strictEqual(servicePath, 'securitycentermanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = securitycentermanagementModule.v1.SecurityCenterManagementClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'securitycentermanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'securitycentermanagement.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'securitycentermanagement.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 securitycentermanagementModule.v1.SecurityCenterManagementClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'securitycentermanagement.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 securitycentermanagementModule.v1.SecurityCenterManagementClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'securitycentermanagement.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 securitycentermanagementModule.v1.SecurityCenterManagementClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = securitycentermanagementModule.v1.SecurityCenterManagementClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.securityCenterManagementStub, undefined); + await client.initialize(); + assert(client.securityCenterManagementStub); + }); + + it('has close method for the initialized client', done => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.securityCenterManagementStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.securityCenterManagementStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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('getEffectiveSecurityHealthAnalyticsCustomModule', () => { + it('invokes getEffectiveSecurityHealthAnalyticsCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.getEffectiveSecurityHealthAnalyticsCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveSecurityHealthAnalyticsCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEffectiveSecurityHealthAnalyticsCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveSecurityHealthAnalyticsCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEffectiveSecurityHealthAnalyticsCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveSecurityHealthAnalyticsCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEffectiveSecurityHealthAnalyticsCustomModule(request), expectedError); + }); + }); + + describe('getSecurityHealthAnalyticsCustomModule', () => { + it('invokes getSecurityHealthAnalyticsCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.getSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.getSecurityHealthAnalyticsCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSecurityHealthAnalyticsCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.getSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSecurityHealthAnalyticsCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSecurityHealthAnalyticsCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSecurityHealthAnalyticsCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSecurityHealthAnalyticsCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSecurityHealthAnalyticsCustomModule(request), expectedError); + }); + }); + + describe('createSecurityHealthAnalyticsCustomModule', () => { + it('invokes createSecurityHealthAnalyticsCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.createSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.createSecurityHealthAnalyticsCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSecurityHealthAnalyticsCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.createSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSecurityHealthAnalyticsCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSecurityHealthAnalyticsCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createSecurityHealthAnalyticsCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSecurityHealthAnalyticsCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createSecurityHealthAnalyticsCustomModule(request), expectedError); + }); + }); + + describe('updateSecurityHealthAnalyticsCustomModule', () => { + it('invokes updateSecurityHealthAnalyticsCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() + ); + request.securityHealthAnalyticsCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); + request.securityHealthAnalyticsCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `security_health_analytics_custom_module.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.updateSecurityHealthAnalyticsCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSecurityHealthAnalyticsCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() + ); + request.securityHealthAnalyticsCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); + request.securityHealthAnalyticsCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `security_health_analytics_custom_module.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() + ); + client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSecurityHealthAnalyticsCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSecurityHealthAnalyticsCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() + ); + request.securityHealthAnalyticsCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); + request.securityHealthAnalyticsCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `security_health_analytics_custom_module.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateSecurityHealthAnalyticsCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSecurityHealthAnalyticsCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() + ); + request.securityHealthAnalyticsCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); + request.securityHealthAnalyticsCustomModule.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateSecurityHealthAnalyticsCustomModule(request), expectedError); + }); + }); + + describe('deleteSecurityHealthAnalyticsCustomModule', () => { + it('invokes deleteSecurityHealthAnalyticsCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSecurityHealthAnalyticsCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSecurityHealthAnalyticsCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSecurityHealthAnalyticsCustomModule( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSecurityHealthAnalyticsCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteSecurityHealthAnalyticsCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSecurityHealthAnalyticsCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteSecurityHealthAnalyticsCustomModule(request), expectedError); + }); + }); + + describe('simulateSecurityHealthAnalyticsCustomModule', () => { + it('invokes simulateSecurityHealthAnalyticsCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse() + ); + client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.simulateSecurityHealthAnalyticsCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes simulateSecurityHealthAnalyticsCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse() + ); + client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.simulateSecurityHealthAnalyticsCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes simulateSecurityHealthAnalyticsCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.simulateSecurityHealthAnalyticsCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes simulateSecurityHealthAnalyticsCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.simulateSecurityHealthAnalyticsCustomModule(request), expectedError); + }); + }); + + describe('getEffectiveEventThreatDetectionCustomModule', () => { + it('invokes getEffectiveEventThreatDetectionCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule() + ); + client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.getEffectiveEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule() + ); + client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEffectiveEventThreatDetectionCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveEventThreatDetectionCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEffectiveEventThreatDetectionCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEffectiveEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEffectiveEventThreatDetectionCustomModule(request), expectedError); + }); + }); + + describe('getEventThreatDetectionCustomModule', () => { + it('invokes getEventThreatDetectionCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.getEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.getEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.getEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEventThreatDetectionCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEventThreatDetectionCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEventThreatDetectionCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEventThreatDetectionCustomModule(request), expectedError); + }); + }); + + describe('createEventThreatDetectionCustomModule', () => { + it('invokes createEventThreatDetectionCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.createEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.createEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.createEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEventThreatDetectionCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEventThreatDetectionCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createEventThreatDetectionCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createEventThreatDetectionCustomModule(request), expectedError); + }); + }); + + describe('updateEventThreatDetectionCustomModule', () => { + it('invokes updateEventThreatDetectionCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() + ); + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.updateEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.updateEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() + ); + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() + ); + client.innerApiCalls.updateEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEventThreatDetectionCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEventThreatDetectionCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() + ); + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateEventThreatDetectionCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() + ); + request.eventThreatDetectionCustomModule ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); + request.eventThreatDetectionCustomModule.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateEventThreatDetectionCustomModule(request), expectedError); + }); + }); + + describe('deleteEventThreatDetectionCustomModule', () => { + it('invokes deleteEventThreatDetectionCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.deleteEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEventThreatDetectionCustomModule( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEventThreatDetectionCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteEventThreatDetectionCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteEventThreatDetectionCustomModule(request), expectedError); + }); + }); + + describe('validateEventThreatDetectionCustomModule', () => { + it('invokes validateEventThreatDetectionCustomModule without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse() + ); + client.innerApiCalls.validateEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); + const [response] = await client.validateEventThreatDetectionCustomModule(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateEventThreatDetectionCustomModule without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse() + ); + client.innerApiCalls.validateEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.validateEventThreatDetectionCustomModule( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateEventThreatDetectionCustomModule with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.validateEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.validateEventThreatDetectionCustomModule(request), expectedError); + const actualRequest = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes validateEventThreatDetectionCustomModule with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.validateEventThreatDetectionCustomModule(request), expectedError); + }); + }); + + describe('getSecurityCenterService', () => { + it('invokes getSecurityCenterService without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() + ); + client.innerApiCalls.getSecurityCenterService = stubSimpleCall(expectedResponse); + const [response] = await client.getSecurityCenterService(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSecurityCenterService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSecurityCenterService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSecurityCenterService without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() + ); + client.innerApiCalls.getSecurityCenterService = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSecurityCenterService( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSecurityCenterService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSecurityCenterService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSecurityCenterService with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSecurityCenterService = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSecurityCenterService(request), expectedError); + const actualRequest = (client.innerApiCalls.getSecurityCenterService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSecurityCenterService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSecurityCenterService with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getSecurityCenterService(request), expectedError); + }); + }); + + describe('updateSecurityCenterService', () => { + it('invokes updateSecurityCenterService without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() + ); + request.securityCenterService ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); + request.securityCenterService.name = defaultValue1; + const expectedHeaderRequestParams = `security_center_service.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() + ); + client.innerApiCalls.updateSecurityCenterService = stubSimpleCall(expectedResponse); + const [response] = await client.updateSecurityCenterService(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSecurityCenterService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityCenterService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSecurityCenterService without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() + ); + request.securityCenterService ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); + request.securityCenterService.name = defaultValue1; + const expectedHeaderRequestParams = `security_center_service.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() + ); + client.innerApiCalls.updateSecurityCenterService = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSecurityCenterService( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSecurityCenterService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityCenterService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSecurityCenterService with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() + ); + request.securityCenterService ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); + request.securityCenterService.name = defaultValue1; + const expectedHeaderRequestParams = `security_center_service.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSecurityCenterService = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateSecurityCenterService(request), expectedError); + const actualRequest = (client.innerApiCalls.updateSecurityCenterService as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityCenterService as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSecurityCenterService with closed client', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() + ); + request.securityCenterService ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); + request.securityCenterService.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateSecurityCenterService(request), expectedError); + }); + }); + + describe('listEffectiveSecurityHealthAnalyticsCustomModules', () => { + it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + ]; + client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = stubSimpleCall(expectedResponse); + const [response] = await client.listEffectiveSecurityHealthAnalyticsCustomModules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + ]; + client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEffectiveSecurityHealthAnalyticsCustomModules( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEffectiveSecurityHealthAnalyticsCustomModules(request), expectedError); + const actualRequest = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + ]; + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) => { + 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.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules, request)); + assert( + (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules, request)); + assert( + (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), + ]; + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = []; + const iterable = client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listSecurityHealthAnalyticsCustomModules', () => { + it('invokes listSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = stubSimpleCall(expectedResponse); + const [response] = await client.listSecurityHealthAnalyticsCustomModules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSecurityHealthAnalyticsCustomModules without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSecurityHealthAnalyticsCustomModules( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSecurityHealthAnalyticsCustomModules(request), expectedError); + const actualRequest = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSecurityHealthAnalyticsCustomModulesStream without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listSecurityHealthAnalyticsCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { + 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.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, request)); + assert( + (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSecurityHealthAnalyticsCustomModulesStream with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listSecurityHealthAnalyticsCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, request)); + assert( + (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; + const iterable = client.listSecurityHealthAnalyticsCustomModulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSecurityHealthAnalyticsCustomModulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDescendantSecurityHealthAnalyticsCustomModules', () => { + it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = stubSimpleCall(expectedResponse); + const [response] = await client.listDescendantSecurityHealthAnalyticsCustomModules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDescendantSecurityHealthAnalyticsCustomModules( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDescendantSecurityHealthAnalyticsCustomModules(request), expectedError); + const actualRequest = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDescendantSecurityHealthAnalyticsCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { + 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.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules, request)); + assert( + (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDescendantSecurityHealthAnalyticsCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules, request)); + assert( + (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), + ]; + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; + const iterable = client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listEffectiveEventThreatDetectionCustomModules', () => { + it('invokes listEffectiveEventThreatDetectionCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + ]; + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); + const [response] = await client.listEffectiveEventThreatDetectionCustomModules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEffectiveEventThreatDetectionCustomModules without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + ]; + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEffectiveEventThreatDetectionCustomModules( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEffectiveEventThreatDetectionCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEffectiveEventThreatDetectionCustomModules(request), expectedError); + const actualRequest = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEffectiveEventThreatDetectionCustomModulesStream without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + ]; + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEffectiveEventThreatDetectionCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) => { + 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.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules, request)); + assert( + (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEffectiveEventThreatDetectionCustomModulesStream with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEffectiveEventThreatDetectionCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules, request)); + assert( + (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEffectiveEventThreatDetectionCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), + ]; + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[] = []; + const iterable = client.listEffectiveEventThreatDetectionCustomModulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEffectiveEventThreatDetectionCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEffectiveEventThreatDetectionCustomModulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listEventThreatDetectionCustomModules', () => { + it('invokes listEventThreatDetectionCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); + const [response] = await client.listEventThreatDetectionCustomModules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEventThreatDetectionCustomModules without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEventThreatDetectionCustomModules( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEventThreatDetectionCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEventThreatDetectionCustomModules(request), expectedError); + const actualRequest = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEventThreatDetectionCustomModulesStream without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.descriptors.page.listEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEventThreatDetectionCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { + 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.listEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEventThreatDetectionCustomModules, request)); + assert( + (client.descriptors.page.listEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEventThreatDetectionCustomModulesStream with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEventThreatDetectionCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEventThreatDetectionCustomModules, request)); + assert( + (client.descriptors.page.listEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEventThreatDetectionCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; + const iterable = client.listEventThreatDetectionCustomModulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEventThreatDetectionCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEventThreatDetectionCustomModulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDescendantEventThreatDetectionCustomModules', () => { + it('invokes listDescendantEventThreatDetectionCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); + const [response] = await client.listDescendantEventThreatDetectionCustomModules(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantEventThreatDetectionCustomModules without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDescendantEventThreatDetectionCustomModules( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantEventThreatDetectionCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDescendantEventThreatDetectionCustomModules(request), expectedError); + const actualRequest = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDescendantEventThreatDetectionCustomModulesStream without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDescendantEventThreatDetectionCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { + 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.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDescendantEventThreatDetectionCustomModules, request)); + assert( + (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDescendantEventThreatDetectionCustomModulesStream with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDescendantEventThreatDetectionCustomModulesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDescendantEventThreatDetectionCustomModules, request)); + assert( + (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDescendantEventThreatDetectionCustomModules without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), + ]; + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; + const iterable = client.listDescendantEventThreatDetectionCustomModulesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDescendantEventThreatDetectionCustomModules with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDescendantEventThreatDetectionCustomModulesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listSecurityCenterServices', () => { + it('invokes listSecurityCenterServices without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + ]; + client.innerApiCalls.listSecurityCenterServices = stubSimpleCall(expectedResponse); + const [response] = await client.listSecurityCenterServices(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSecurityCenterServices as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSecurityCenterServices as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSecurityCenterServices without error using callback', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + ]; + client.innerApiCalls.listSecurityCenterServices = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSecurityCenterServices( + request, + (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSecurityCenterServices as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSecurityCenterServices as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSecurityCenterServices with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSecurityCenterServices = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSecurityCenterServices(request), expectedError); + const actualRequest = (client.innerApiCalls.listSecurityCenterServices as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSecurityCenterServices as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSecurityCenterServicesStream without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + ]; + client.descriptors.page.listSecurityCenterServices.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listSecurityCenterServicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService) => { + 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.listSecurityCenterServices.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSecurityCenterServices, request)); + assert( + (client.descriptors.page.listSecurityCenterServices.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listSecurityCenterServicesStream with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSecurityCenterServices.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listSecurityCenterServicesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService[] = []; + stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listSecurityCenterServices.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listSecurityCenterServices, request)); + assert( + (client.descriptors.page.listSecurityCenterServices.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSecurityCenterServices without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), + ]; + client.descriptors.page.listSecurityCenterServices.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[] = []; + const iterable = client.listSecurityCenterServicesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listSecurityCenterServices with error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listSecurityCenterServices.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listSecurityCenterServicesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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('Path templates', () => { + + describe('folderLocationEffectiveEventThreatDetectionCustomModule', () => { + const fakePath = "/rendered/path/folderLocationEffectiveEventThreatDetectionCustomModule"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + effective_event_threat_detection_custom_module: "effectiveEventThreatDetectionCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationEffectiveEventThreatDetectionCustomModulePath', () => { + const result = client.folderLocationEffectiveEventThreatDetectionCustomModulePath("folderValue", "locationValue", "effectiveEventThreatDetectionCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchFolderFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchLocationFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEffectiveEventThreatDetectionCustomModuleFromFolderLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchEffectiveEventThreatDetectionCustomModuleFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "effectiveEventThreatDetectionCustomModuleValue"); + assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { + const fakePath = "/rendered/path/folderLocationEffectiveSecurityHealthAnalyticsCustomModule"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + effective_security_health_analytics_custom_module: "effectiveSecurityHealthAnalyticsCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationEffectiveSecurityHealthAnalyticsCustomModulePath', () => { + const result = client.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePath("folderValue", "locationValue", "effectiveSecurityHealthAnalyticsCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchFolderFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchLocationFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEffectiveSecurityHealthAnalyticsCustomModuleFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchEffectiveSecurityHealthAnalyticsCustomModuleFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "effectiveSecurityHealthAnalyticsCustomModuleValue"); + assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationEventThreatDetectionCustomModule', () => { + const fakePath = "/rendered/path/folderLocationEventThreatDetectionCustomModule"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + event_threat_detection_custom_module: "eventThreatDetectionCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationEventThreatDetectionCustomModulePath', () => { + const result = client.folderLocationEventThreatDetectionCustomModulePath("folderValue", "locationValue", "eventThreatDetectionCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchFolderFromFolderLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchLocationFromFolderLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEventThreatDetectionCustomModuleFromFolderLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchEventThreatDetectionCustomModuleFromFolderLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "eventThreatDetectionCustomModuleValue"); + assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationSecurityHealthAnalyticsCustomModule', () => { + const fakePath = "/rendered/path/folderLocationSecurityHealthAnalyticsCustomModule"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + security_health_analytics_custom_module: "securityHealthAnalyticsCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationSecurityHealthAnalyticsCustomModulePath', () => { + const result = client.folderLocationSecurityHealthAnalyticsCustomModulePath("folderValue", "locationValue", "securityHealthAnalyticsCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchFolderFromFolderLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchLocationFromFolderLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSecurityHealthAnalyticsCustomModuleFromFolderLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchSecurityHealthAnalyticsCustomModuleFromFolderLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "securityHealthAnalyticsCustomModuleValue"); + assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderLocationService', () => { + const fakePath = "/rendered/path/folderLocationService"; + const expectedParameters = { + folder: "folderValue", + location: "locationValue", + service: "serviceValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderLocationServicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderLocationServicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderLocationServicePath', () => { + const result = client.folderLocationServicePath("folderValue", "locationValue", "serviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderLocationServicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderLocationServiceName', () => { + const result = client.matchFolderFromFolderLocationServiceName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromFolderLocationServiceName', () => { + const result = client.matchLocationFromFolderLocationServiceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.folderLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchServiceFromFolderLocationServiceName', () => { + const result = client.matchServiceFromFolderLocationServiceName(fakePath); + assert.strictEqual(result, "serviceValue"); + assert((client.pathTemplates.folderLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('folderSourceFinding', () => { + const fakePath = "/rendered/path/folderSourceFinding"; + const expectedParameters = { + folder: "folderValue", + source: "sourceValue", + finding: "findingValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.folderSourceFindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.folderSourceFindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('folderSourceFindingPath', () => { + const result = client.folderSourceFindingPath("folderValue", "sourceValue", "findingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.folderSourceFindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchFolderFromFolderSourceFindingName', () => { + const result = client.matchFolderFromFolderSourceFindingName(fakePath); + assert.strictEqual(result, "folderValue"); + assert((client.pathTemplates.folderSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSourceFromFolderSourceFindingName', () => { + const result = client.matchSourceFromFolderSourceFindingName(fakePath); + assert.strictEqual(result, "sourceValue"); + assert((client.pathTemplates.folderSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingFromFolderSourceFindingName', () => { + const result = client.matchFindingFromFolderSourceFindingName(fakePath); + assert.strictEqual(result, "findingValue"); + assert((client.pathTemplates.folderSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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('organization', () => { + const fakePath = "/rendered/path/organization"; + const expectedParameters = { + organization: "organizationValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath("organizationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocation', () => { + const fakePath = "/rendered/path/organizationLocation"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationPath', () => { + const result = client.organizationLocationPath("organizationValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationName', () => { + const result = client.matchOrganizationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationName', () => { + const result = client.matchLocationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationEffectiveEventThreatDetectionCustomModule', () => { + const fakePath = "/rendered/path/organizationLocationEffectiveEventThreatDetectionCustomModule"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + effective_event_threat_detection_custom_module: "effectiveEventThreatDetectionCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationEffectiveEventThreatDetectionCustomModulePath', () => { + const result = client.organizationLocationEffectiveEventThreatDetectionCustomModulePath("organizationValue", "locationValue", "effectiveEventThreatDetectionCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchOrganizationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchLocationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEffectiveEventThreatDetectionCustomModuleFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchEffectiveEventThreatDetectionCustomModuleFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "effectiveEventThreatDetectionCustomModuleValue"); + assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { + const fakePath = "/rendered/path/organizationLocationEffectiveSecurityHealthAnalyticsCustomModule"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + effective_security_health_analytics_custom_module: "effectiveSecurityHealthAnalyticsCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePath', () => { + const result = client.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePath("organizationValue", "locationValue", "effectiveSecurityHealthAnalyticsCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchOrganizationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchLocationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEffectiveSecurityHealthAnalyticsCustomModuleFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchEffectiveSecurityHealthAnalyticsCustomModuleFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "effectiveSecurityHealthAnalyticsCustomModuleValue"); + assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationEventThreatDetectionCustomModule', () => { + const fakePath = "/rendered/path/organizationLocationEventThreatDetectionCustomModule"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + event_threat_detection_custom_module: "eventThreatDetectionCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationEventThreatDetectionCustomModulePath', () => { + const result = client.organizationLocationEventThreatDetectionCustomModulePath("organizationValue", "locationValue", "eventThreatDetectionCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchOrganizationFromOrganizationLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchLocationFromOrganizationLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEventThreatDetectionCustomModuleFromOrganizationLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchEventThreatDetectionCustomModuleFromOrganizationLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "eventThreatDetectionCustomModuleValue"); + assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationSecurityHealthAnalyticsCustomModule', () => { + const fakePath = "/rendered/path/organizationLocationSecurityHealthAnalyticsCustomModule"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + security_health_analytics_custom_module: "securityHealthAnalyticsCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationSecurityHealthAnalyticsCustomModulePath', () => { + const result = client.organizationLocationSecurityHealthAnalyticsCustomModulePath("organizationValue", "locationValue", "securityHealthAnalyticsCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchOrganizationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchLocationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSecurityHealthAnalyticsCustomModuleFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchSecurityHealthAnalyticsCustomModuleFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "securityHealthAnalyticsCustomModuleValue"); + assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationService', () => { + const fakePath = "/rendered/path/organizationLocationService"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + service: "serviceValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationLocationServicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationServicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationServicePath', () => { + const result = client.organizationLocationServicePath("organizationValue", "locationValue", "serviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationServicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationServiceName', () => { + const result = client.matchOrganizationFromOrganizationLocationServiceName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationServiceName', () => { + const result = client.matchLocationFromOrganizationLocationServiceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchServiceFromOrganizationLocationServiceName', () => { + const result = client.matchServiceFromOrganizationLocationServiceName(fakePath); + assert.strictEqual(result, "serviceValue"); + assert((client.pathTemplates.organizationLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationSourceFinding', () => { + const fakePath = "/rendered/path/organizationSourceFinding"; + const expectedParameters = { + organization: "organizationValue", + source: "sourceValue", + finding: "findingValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.organizationSourceFindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationSourceFindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationSourceFindingPath', () => { + const result = client.organizationSourceFindingPath("organizationValue", "sourceValue", "findingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationSourceFindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationSourceFindingName', () => { + const result = client.matchOrganizationFromOrganizationSourceFindingName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSourceFromOrganizationSourceFindingName', () => { + const result = client.matchSourceFromOrganizationSourceFindingName(fakePath); + assert.strictEqual(result, "sourceValue"); + assert((client.pathTemplates.organizationSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingFromOrganizationSourceFindingName', () => { + const result = client.matchFindingFromOrganizationSourceFindingName(fakePath); + assert.strictEqual(result, "findingValue"); + assert((client.pathTemplates.organizationSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + 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('projectLocationEffectiveEventThreatDetectionCustomModule', () => { + const fakePath = "/rendered/path/projectLocationEffectiveEventThreatDetectionCustomModule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + effective_event_threat_detection_custom_module: "effectiveEventThreatDetectionCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationEffectiveEventThreatDetectionCustomModulePath', () => { + const result = client.projectLocationEffectiveEventThreatDetectionCustomModulePath("projectValue", "locationValue", "effectiveEventThreatDetectionCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchProjectFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchLocationFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEffectiveEventThreatDetectionCustomModuleFromProjectLocationEffectiveEventThreatDetectionCustomModuleName', () => { + const result = client.matchEffectiveEventThreatDetectionCustomModuleFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "effectiveEventThreatDetectionCustomModuleValue"); + assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { + const fakePath = "/rendered/path/projectLocationEffectiveSecurityHealthAnalyticsCustomModule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + effective_security_health_analytics_custom_module: "effectiveSecurityHealthAnalyticsCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationEffectiveSecurityHealthAnalyticsCustomModulePath', () => { + const result = client.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePath("projectValue", "locationValue", "effectiveSecurityHealthAnalyticsCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchProjectFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchLocationFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEffectiveSecurityHealthAnalyticsCustomModuleFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchEffectiveSecurityHealthAnalyticsCustomModuleFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "effectiveSecurityHealthAnalyticsCustomModuleValue"); + assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationEventThreatDetectionCustomModule', () => { + const fakePath = "/rendered/path/projectLocationEventThreatDetectionCustomModule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + event_threat_detection_custom_module: "eventThreatDetectionCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationEventThreatDetectionCustomModulePath', () => { + const result = client.projectLocationEventThreatDetectionCustomModulePath("projectValue", "locationValue", "eventThreatDetectionCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchProjectFromProjectLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchLocationFromProjectLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEventThreatDetectionCustomModuleFromProjectLocationEventThreatDetectionCustomModuleName', () => { + const result = client.matchEventThreatDetectionCustomModuleFromProjectLocationEventThreatDetectionCustomModuleName(fakePath); + assert.strictEqual(result, "eventThreatDetectionCustomModuleValue"); + assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSecurityHealthAnalyticsCustomModule', () => { + const fakePath = "/rendered/path/projectLocationSecurityHealthAnalyticsCustomModule"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + security_health_analytics_custom_module: "securityHealthAnalyticsCustomModuleValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSecurityHealthAnalyticsCustomModulePath', () => { + const result = client.projectLocationSecurityHealthAnalyticsCustomModulePath("projectValue", "locationValue", "securityHealthAnalyticsCustomModuleValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchProjectFromProjectLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchLocationFromProjectLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSecurityHealthAnalyticsCustomModuleFromProjectLocationSecurityHealthAnalyticsCustomModuleName', () => { + const result = client.matchSecurityHealthAnalyticsCustomModuleFromProjectLocationSecurityHealthAnalyticsCustomModuleName(fakePath); + assert.strictEqual(result, "securityHealthAnalyticsCustomModuleValue"); + assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationService', () => { + const fakePath = "/rendered/path/projectLocationService"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + service: "serviceValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationServicePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationServicePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationServicePath', () => { + const result = client.projectLocationServicePath("projectValue", "locationValue", "serviceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationServicePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationServiceName', () => { + const result = client.matchProjectFromProjectLocationServiceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationServiceName', () => { + const result = client.matchLocationFromProjectLocationServiceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchServiceFromProjectLocationServiceName', () => { + const result = client.matchServiceFromProjectLocationServiceName(fakePath); + assert.strictEqual(result, "serviceValue"); + assert((client.pathTemplates.projectLocationServicePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectSourceFinding', () => { + const fakePath = "/rendered/path/projectSourceFinding"; + const expectedParameters = { + project: "projectValue", + source: "sourceValue", + finding: "findingValue", + }; + const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectSourceFindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectSourceFindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectSourceFindingPath', () => { + const result = client.projectSourceFindingPath("projectValue", "sourceValue", "findingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectSourceFindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectSourceFindingName', () => { + const result = client.matchProjectFromProjectSourceFindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSourceFromProjectSourceFindingName', () => { + const result = client.matchSourceFromProjectSourceFindingName(fakePath); + assert.strictEqual(result, "sourceValue"); + assert((client.pathTemplates.projectSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFindingFromProjectSourceFindingName', () => { + const result = client.matchFindingFromProjectSourceFindingName(fakePath); + assert.strictEqual(result, "findingValue"); + assert((client.pathTemplates.projectSourceFindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/tsconfig.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/webpack.config.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/webpack.config.js new file mode 100644 index 00000000000..ab2a70eee26 --- /dev/null +++ b/owl-bot-staging/google-cloud-securitycentermanagement/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: 'SecurityCenterManagement', + filename: './security-center-management.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 c7f981812a5c9bfb2ac20c00f6adc30eb2bc1702 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 30 Oct 2024 06:26:53 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../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 - .../eventarc/publishing/v1/publisher.proto | 156 - .../v1/protos/protos.d.ts | 7403 ---- .../v1/protos/protos.js | 20370 --------- .../v1/protos/protos.json | 2057 - ...isher.publish_channel_connection_events.js | 74 - .../generated/v1/publisher.publish_events.js | 74 - ...a_google.cloud.eventarc.publishing.v1.json | 163 - .../v1/src/index.ts | 25 - .../v1/src/v1/gapic_metadata.json | 53 - .../v1/src/v1/index.ts | 19 - .../v1/src/v1/publisher_client.ts | 600 - .../v1/src/v1/publisher_client_config.json | 40 - .../v1/src/v1/publisher_proto_list.json | 4 - .../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_publisher_v1.ts | 538 - .../v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../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/security_center_management.proto | 1796 - .../v1/protos/protos.d.ts | 13604 ------ .../v1/protos/protos.js | 35369 ---------------- .../v1/protos/protos.json | 3971 -- ...te_event_threat_detection_custom_module.js | 84 - ...security_health_analytics_custom_module.js | 83 - ...te_event_threat_detection_custom_module.js | 78 - ...security_health_analytics_custom_module.js | 78 - ...ve_event_threat_detection_custom_module.js | 65 - ...security_health_analytics_custom_module.js | 65 - ...et_event_threat_detection_custom_module.js | 65 - ..._management.get_security_center_service.js | 76 - ...security_health_analytics_custom_module.js | 62 - ...t_event_threat_detection_custom_modules.js | 80 - ...ecurity_health_analytics_custom_modules.js | 79 - ...e_event_threat_detection_custom_modules.js | 79 - ...ecurity_health_analytics_custom_modules.js | 79 - ...t_event_threat_detection_custom_modules.js | 80 - ...anagement.list_security_center_services.js | 84 - ...ecurity_health_analytics_custom_modules.js | 79 - ...security_health_analytics_custom_module.js | 74 - ...te_event_threat_detection_custom_module.js | 79 - ...nagement.update_security_center_service.js | 82 - ...security_health_analytics_custom_module.js | 83 - ...te_event_threat_detection_custom_module.js | 74 - ...gle.cloud.securitycentermanagement.v1.json | 983 - .../v1/src/index.ts | 25 - .../v1/src/v1/gapic_metadata.json | 261 - .../v1/src/v1/index.ts | 19 - .../v1/security_center_management_client.ts | 4154 -- ...urity_center_management_client_config.json | 128 - ...security_center_management_proto_list.json | 3 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../v1/system-test/install.ts | 49 - .../gapic_security_center_management_v1.ts | 4633 -- .../v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../README.md | 5 +- .../eventarc/publishing/v1/cloud_event.proto | 0 .../eventarc/publishing/v1/publisher.proto | 48 + .../protos/protos.d.ts | 886 +- .../protos/protos.js | 2371 +- .../protos/protos.json | 242 +- .../samples/README.md | 18 + .../samples/generated/v1/publisher.publish.js | 0 ...a_google.cloud.eventarc.publishing.v1.json | 52 + .../src/v1/gapic_metadata.json | 10 + .../src/v1/publisher_client.ts | 104 + .../src/v1/publisher_client_config.json | 5 + .../src/v1/publisher_proto_list.json | 1 + .../test/gapic_publisher_v1.ts | 127 + .../README.md | 4 +- .../v1/security_center_management.proto | 1043 +- .../protos/protos.json | 3 + ...te_event_threat_detection_custom_module.js | 30 +- ...security_health_analytics_custom_module.js | 22 +- ...te_event_threat_detection_custom_module.js | 27 +- ...security_health_analytics_custom_module.js | 27 +- ...ve_event_threat_detection_custom_module.js | 10 +- ...security_health_analytics_custom_module.js | 6 +- ...et_event_threat_detection_custom_module.js | 10 +- ..._management.get_security_center_service.js | 26 +- ...security_health_analytics_custom_module.js | 3 +- ...t_event_threat_detection_custom_modules.js | 15 +- ...ecurity_health_analytics_custom_modules.js | 7 +- ...e_event_threat_detection_custom_modules.js | 15 +- ...ecurity_health_analytics_custom_modules.js | 12 +- ...t_event_threat_detection_custom_modules.js | 22 +- ...anagement.list_security_center_services.js | 19 +- ...ecurity_health_analytics_custom_modules.js | 9 +- ...security_health_analytics_custom_module.js | 7 +- ...te_event_threat_detection_custom_module.js | 25 +- ...nagement.update_security_center_service.js | 24 +- ...security_health_analytics_custom_module.js | 28 +- ...te_event_threat_detection_custom_module.js | 8 +- ...gle.cloud.securitycentermanagement.v1.json | 60 +- .../v1/security_center_management_client.ts | 715 +- 113 files changed, 4835 insertions(+), 100109 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/test/gapic_publisher_v1.ts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/v1/webpack.config.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-securitycentermanagement/v1/webpack.config.js rename {owl-bot-staging/google-cloud-eventarc-publishing/v1 => packages/google-cloud-eventarc-publishing}/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto (100%) rename {owl-bot-staging/google-cloud-eventarc-publishing/v1 => packages/google-cloud-eventarc-publishing}/samples/generated/v1/publisher.publish.js (100%) diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintignore b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/.eslintrc.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.gitignore b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/.jsdoc.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.jsdoc.js deleted file mode 100644 index dac239f982c..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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/eventarc-publishing', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/.mocharc.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/.prettierrc.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/README.md b/owl-bot-staging/google-cloud-eventarc-publishing/v1/README.md deleted file mode 100644 index e5f320996fd..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Publishing: Nodejs Client diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json deleted file mode 100644 index c2298e54a7d..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/eventarc-publishing", - "version": "0.1.0", - "description": "Publishing client for Node.js", - "repository": "googleapis/nodejs-publishing", - "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 publishing", - "publishing", - "publisher" - ], - "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-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto deleted file mode 100644 index 0037200cb74..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/publisher.proto +++ /dev/null @@ -1,156 +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.eventarc.publishing.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/cloud/eventarc/publishing/v1/cloud_event.proto"; -import "google/protobuf/any.proto"; - -option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1"; -option go_package = "cloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb"; -option java_multiple_files = true; -option java_outer_classname = "PublisherProto"; -option java_package = "com.google.cloud.eventarc.publishing.v1"; -option php_namespace = "Google\\Cloud\\Eventarc\\Publishing\\V1"; -option ruby_package = "Google::Cloud::Eventarc::Publishing::V1"; - -// Eventarc processes events generated by an event provider and delivers them to -// a subscriber. -// -// An event provider is a software-as-a-service (SaaS) system or -// product that can generate and deliver events through Eventarc. -// -// A third-party event provider is an event provider from outside of Google. -// -// A partner is a third-party event provider that is integrated with Eventarc. -// -// A subscriber is a GCP customer interested in receiving events. -// -// Channel is a first-class Eventarc resource that is created and managed -// by the subscriber in their GCP project. A Channel represents a subscriber's -// intent to receive events from an event provider. A Channel is associated with -// exactly one event provider. -// -// ChannelConnection is a first-class Eventarc resource that -// is created and managed by the partner in their GCP project. A -// ChannelConnection represents a connection between a partner and a -// subscriber's Channel. A ChannelConnection has a one-to-one mapping with a -// Channel. -// -// Publisher allows an event provider to publish events to Eventarc. -service Publisher { - option (google.api.default_host) = "eventarcpublishing.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Publish events to a ChannelConnection in a partner's project. - rpc PublishChannelConnectionEvents(PublishChannelConnectionEventsRequest) - returns (PublishChannelConnectionEventsResponse) { - option (google.api.http) = { - post: "/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents" - body: "*" - }; - } - - // Publish events to a subscriber's channel. - rpc PublishEvents(PublishEventsRequest) returns (PublishEventsResponse) { - option (google.api.http) = { - post: "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents" - body: "*" - }; - } - - // Publish events to a message bus. - rpc Publish(PublishRequest) returns (PublishResponse) { - option (google.api.http) = { - post: "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish" - body: "*" - }; - } -} - -// The request message for the PublishChannelConnectionEvents method. -message PublishChannelConnectionEventsRequest { - // The channel_connection that the events are published from. For example: - // `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - string channel_connection = 1; - - // The CloudEvents v1.0 events to publish. No other types are allowed. - // If this field is set, then the `text_events` fields must not be set. - repeated google.protobuf.Any events = 2; - - // The text representation of events to publish. - // CloudEvent v1.0 in JSON format is the only allowed type. Refer to - // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - // for specification. - // If this field is set, then the `events` fields must not be set. - repeated string text_events = 3; -} - -// The response message for the PublishChannelConnectionEvents method. -message PublishChannelConnectionEventsResponse {} - -// The request message for the PublishEvents method. -message PublishEventsRequest { - // The full name of the channel to publish to. For example: - // `projects/{project}/locations/{location}/channels/{channel-id}`. - string channel = 1; - - // The CloudEvents v1.0 events to publish. No other types are allowed. - // If this field is set, then the `text_events` fields must not be set. - repeated google.protobuf.Any events = 2; - - // The text representation of events to publish. - // CloudEvent v1.0 in JSON format is the only allowed type. Refer to - // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - // for specification. - // If this field is set, then the `events` fields must not be set. - repeated string text_events = 3; -} - -// The response message for the PublishEvents method. -message PublishEventsResponse {} - -// The request message for the Publish method. -message PublishRequest { - // Required. The full name of the message bus to publish events to. Format: - // `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - string message_bus = 1 [(google.api.field_behavior) = REQUIRED]; - - oneof format { - // The Protobuf format of the CloudEvent being published. Specification can - // be found here: - // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - CloudEvent proto_message = 2; - - // The JSON format of the CloudEvent being published. Specification can be - // found here: - // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - string json_message = 3; - - // The Avro format of the CloudEvent being published. Specification can - // be found here: - // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - bytes avro_message = 4; - } -} - -// The response message for the Publish method. -message PublishResponse {} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts deleted file mode 100644 index d060f240e25..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.d.ts +++ /dev/null @@ -1,7403 +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 eventarc. */ - namespace eventarc { - - /** Namespace publishing. */ - namespace publishing { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a CloudEvent. */ - interface ICloudEvent { - - /** CloudEvent id */ - id?: (string|null); - - /** CloudEvent source */ - source?: (string|null); - - /** CloudEvent specVersion */ - specVersion?: (string|null); - - /** CloudEvent type */ - type?: (string|null); - - /** CloudEvent attributes */ - attributes?: ({ [k: string]: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue }|null); - - /** CloudEvent binaryData */ - binaryData?: (Uint8Array|string|null); - - /** CloudEvent textData */ - textData?: (string|null); - - /** CloudEvent protoData */ - protoData?: (google.protobuf.IAny|null); - } - - /** Represents a CloudEvent. */ - class CloudEvent implements ICloudEvent { - - /** - * Constructs a new CloudEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.ICloudEvent); - - /** CloudEvent id. */ - public id: string; - - /** CloudEvent source. */ - public source: string; - - /** CloudEvent specVersion. */ - public specVersion: string; - - /** CloudEvent type. */ - public type: string; - - /** CloudEvent attributes. */ - public attributes: { [k: string]: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue }; - - /** CloudEvent binaryData. */ - public binaryData?: (Uint8Array|string|null); - - /** CloudEvent textData. */ - public textData?: (string|null); - - /** CloudEvent protoData. */ - public protoData?: (google.protobuf.IAny|null); - - /** CloudEvent data. */ - public data?: ("binaryData"|"textData"|"protoData"); - - /** - * Creates a new CloudEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudEvent instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.ICloudEvent): google.cloud.eventarc.publishing.v1.CloudEvent; - - /** - * Encodes the specified CloudEvent message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. - * @param message CloudEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.ICloudEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudEvent message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. - * @param message CloudEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.ICloudEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.CloudEvent; - - /** - * Decodes a CloudEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.CloudEvent; - - /** - * Verifies a CloudEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudEvent - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.CloudEvent; - - /** - * Creates a plain object from a CloudEvent message. Also converts values to other types if specified. - * @param message CloudEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.CloudEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudEvent { - - /** Properties of a CloudEventAttributeValue. */ - interface ICloudEventAttributeValue { - - /** CloudEventAttributeValue ceBoolean */ - ceBoolean?: (boolean|null); - - /** CloudEventAttributeValue ceInteger */ - ceInteger?: (number|null); - - /** CloudEventAttributeValue ceString */ - ceString?: (string|null); - - /** CloudEventAttributeValue ceBytes */ - ceBytes?: (Uint8Array|string|null); - - /** CloudEventAttributeValue ceUri */ - ceUri?: (string|null); - - /** CloudEventAttributeValue ceUriRef */ - ceUriRef?: (string|null); - - /** CloudEventAttributeValue ceTimestamp */ - ceTimestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents a CloudEventAttributeValue. */ - class CloudEventAttributeValue implements ICloudEventAttributeValue { - - /** - * Constructs a new CloudEventAttributeValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue); - - /** CloudEventAttributeValue ceBoolean. */ - public ceBoolean?: (boolean|null); - - /** CloudEventAttributeValue ceInteger. */ - public ceInteger?: (number|null); - - /** CloudEventAttributeValue ceString. */ - public ceString?: (string|null); - - /** CloudEventAttributeValue ceBytes. */ - public ceBytes?: (Uint8Array|string|null); - - /** CloudEventAttributeValue ceUri. */ - public ceUri?: (string|null); - - /** CloudEventAttributeValue ceUriRef. */ - public ceUriRef?: (string|null); - - /** CloudEventAttributeValue ceTimestamp. */ - public ceTimestamp?: (google.protobuf.ITimestamp|null); - - /** CloudEventAttributeValue attr. */ - public attr?: ("ceBoolean"|"ceInteger"|"ceString"|"ceBytes"|"ceUri"|"ceUriRef"|"ceTimestamp"); - - /** - * Creates a new CloudEventAttributeValue instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudEventAttributeValue instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; - - /** - * Encodes the specified CloudEventAttributeValue message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. - * @param message CloudEventAttributeValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudEventAttributeValue message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. - * @param message CloudEventAttributeValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudEventAttributeValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudEventAttributeValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; - - /** - * Decodes a CloudEventAttributeValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudEventAttributeValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; - - /** - * Verifies a CloudEventAttributeValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudEventAttributeValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudEventAttributeValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; - - /** - * Creates a plain object from a CloudEventAttributeValue message. Also converts values to other types if specified. - * @param message CloudEventAttributeValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudEventAttributeValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudEventAttributeValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Represents a Publisher */ - class Publisher extends $protobuf.rpc.Service { - - /** - * Constructs a new Publisher 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 Publisher 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): Publisher; - - /** - * Calls PublishChannelConnectionEvents. - * @param request PublishChannelConnectionEventsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PublishChannelConnectionEventsResponse - */ - public publishChannelConnectionEvents(request: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, callback: google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEventsCallback): void; - - /** - * Calls PublishChannelConnectionEvents. - * @param request PublishChannelConnectionEventsRequest message or plain object - * @returns Promise - */ - public publishChannelConnectionEvents(request: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest): Promise; - - /** - * Calls PublishEvents. - * @param request PublishEventsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PublishEventsResponse - */ - public publishEvents(request: google.cloud.eventarc.publishing.v1.IPublishEventsRequest, callback: google.cloud.eventarc.publishing.v1.Publisher.PublishEventsCallback): void; - - /** - * Calls PublishEvents. - * @param request PublishEventsRequest message or plain object - * @returns Promise - */ - public publishEvents(request: google.cloud.eventarc.publishing.v1.IPublishEventsRequest): Promise; - - /** - * Calls Publish. - * @param request PublishRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PublishResponse - */ - public publish(request: google.cloud.eventarc.publishing.v1.IPublishRequest, callback: google.cloud.eventarc.publishing.v1.Publisher.PublishCallback): void; - - /** - * Calls Publish. - * @param request PublishRequest message or plain object - * @returns Promise - */ - public publish(request: google.cloud.eventarc.publishing.v1.IPublishRequest): Promise; - } - - namespace Publisher { - - /** - * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishChannelConnectionEvents}. - * @param error Error, if any - * @param [response] PublishChannelConnectionEventsResponse - */ - type PublishChannelConnectionEventsCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) => void; - - /** - * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishEvents}. - * @param error Error, if any - * @param [response] PublishEventsResponse - */ - type PublishEventsCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishEventsResponse) => void; - - /** - * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publish}. - * @param error Error, if any - * @param [response] PublishResponse - */ - type PublishCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishResponse) => void; - } - - /** Properties of a PublishChannelConnectionEventsRequest. */ - interface IPublishChannelConnectionEventsRequest { - - /** PublishChannelConnectionEventsRequest channelConnection */ - channelConnection?: (string|null); - - /** PublishChannelConnectionEventsRequest events */ - events?: (google.protobuf.IAny[]|null); - - /** PublishChannelConnectionEventsRequest textEvents */ - textEvents?: (string[]|null); - } - - /** Represents a PublishChannelConnectionEventsRequest. */ - class PublishChannelConnectionEventsRequest implements IPublishChannelConnectionEventsRequest { - - /** - * Constructs a new PublishChannelConnectionEventsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest); - - /** PublishChannelConnectionEventsRequest channelConnection. */ - public channelConnection: string; - - /** PublishChannelConnectionEventsRequest events. */ - public events: google.protobuf.IAny[]; - - /** PublishChannelConnectionEventsRequest textEvents. */ - public textEvents: string[]; - - /** - * Creates a new PublishChannelConnectionEventsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishChannelConnectionEventsRequest instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; - - /** - * Encodes the specified PublishChannelConnectionEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. - * @param message PublishChannelConnectionEventsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishChannelConnectionEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. - * @param message PublishChannelConnectionEventsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishChannelConnectionEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; - - /** - * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishChannelConnectionEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; - - /** - * Verifies a PublishChannelConnectionEventsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishChannelConnectionEventsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishChannelConnectionEventsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest; - - /** - * Creates a plain object from a PublishChannelConnectionEventsRequest message. Also converts values to other types if specified. - * @param message PublishChannelConnectionEventsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishChannelConnectionEventsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishChannelConnectionEventsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublishChannelConnectionEventsResponse. */ - interface IPublishChannelConnectionEventsResponse { - } - - /** Represents a PublishChannelConnectionEventsResponse. */ - class PublishChannelConnectionEventsResponse implements IPublishChannelConnectionEventsResponse { - - /** - * Constructs a new PublishChannelConnectionEventsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse); - - /** - * Creates a new PublishChannelConnectionEventsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishChannelConnectionEventsResponse instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; - - /** - * Encodes the specified PublishChannelConnectionEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. - * @param message PublishChannelConnectionEventsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishChannelConnectionEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. - * @param message PublishChannelConnectionEventsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishChannelConnectionEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; - - /** - * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishChannelConnectionEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; - - /** - * Verifies a PublishChannelConnectionEventsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishChannelConnectionEventsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishChannelConnectionEventsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse; - - /** - * Creates a plain object from a PublishChannelConnectionEventsResponse message. Also converts values to other types if specified. - * @param message PublishChannelConnectionEventsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishChannelConnectionEventsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishChannelConnectionEventsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublishEventsRequest. */ - interface IPublishEventsRequest { - - /** PublishEventsRequest channel */ - channel?: (string|null); - - /** PublishEventsRequest events */ - events?: (google.protobuf.IAny[]|null); - - /** PublishEventsRequest textEvents */ - textEvents?: (string[]|null); - } - - /** Represents a PublishEventsRequest. */ - class PublishEventsRequest implements IPublishEventsRequest { - - /** - * Constructs a new PublishEventsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsRequest); - - /** PublishEventsRequest channel. */ - public channel: string; - - /** PublishEventsRequest events. */ - public events: google.protobuf.IAny[]; - - /** PublishEventsRequest textEvents. */ - public textEvents: string[]; - - /** - * Creates a new PublishEventsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishEventsRequest instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsRequest): google.cloud.eventarc.publishing.v1.PublishEventsRequest; - - /** - * Encodes the specified PublishEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. - * @param message PublishEventsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.IPublishEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. - * @param message PublishEventsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishEventsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishEventsRequest; - - /** - * Decodes a PublishEventsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishEventsRequest; - - /** - * Verifies a PublishEventsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishEventsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishEventsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishEventsRequest; - - /** - * Creates a plain object from a PublishEventsRequest message. Also converts values to other types if specified. - * @param message PublishEventsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.PublishEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishEventsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishEventsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublishEventsResponse. */ - interface IPublishEventsResponse { - } - - /** Represents a PublishEventsResponse. */ - class PublishEventsResponse implements IPublishEventsResponse { - - /** - * Constructs a new PublishEventsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsResponse); - - /** - * Creates a new PublishEventsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishEventsResponse instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishEventsResponse): google.cloud.eventarc.publishing.v1.PublishEventsResponse; - - /** - * Encodes the specified PublishEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. - * @param message PublishEventsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.IPublishEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. - * @param message PublishEventsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishEventsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishEventsResponse; - - /** - * Decodes a PublishEventsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishEventsResponse; - - /** - * Verifies a PublishEventsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishEventsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishEventsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishEventsResponse; - - /** - * Creates a plain object from a PublishEventsResponse message. Also converts values to other types if specified. - * @param message PublishEventsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.PublishEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishEventsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishEventsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublishRequest. */ - interface IPublishRequest { - - /** PublishRequest messageBus */ - messageBus?: (string|null); - - /** PublishRequest protoMessage */ - protoMessage?: (google.cloud.eventarc.publishing.v1.ICloudEvent|null); - - /** PublishRequest jsonMessage */ - jsonMessage?: (string|null); - - /** PublishRequest avroMessage */ - avroMessage?: (Uint8Array|string|null); - } - - /** Represents a PublishRequest. */ - class PublishRequest implements IPublishRequest { - - /** - * Constructs a new PublishRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishRequest); - - /** PublishRequest messageBus. */ - public messageBus: string; - - /** PublishRequest protoMessage. */ - public protoMessage?: (google.cloud.eventarc.publishing.v1.ICloudEvent|null); - - /** PublishRequest jsonMessage. */ - public jsonMessage?: (string|null); - - /** PublishRequest avroMessage. */ - public avroMessage?: (Uint8Array|string|null); - - /** PublishRequest format. */ - public format?: ("protoMessage"|"jsonMessage"|"avroMessage"); - - /** - * Creates a new PublishRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishRequest instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishRequest): google.cloud.eventarc.publishing.v1.PublishRequest; - - /** - * Encodes the specified PublishRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. - * @param message PublishRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. - * @param message PublishRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishRequest; - - /** - * Decodes a PublishRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishRequest; - - /** - * Verifies a PublishRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishRequest; - - /** - * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. - * @param message PublishRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.PublishRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublishResponse. */ - interface IPublishResponse { - } - - /** Represents a PublishResponse. */ - class PublishResponse implements IPublishResponse { - - /** - * Constructs a new PublishResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishResponse); - - /** - * Creates a new PublishResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishResponse instance - */ - public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishResponse): google.cloud.eventarc.publishing.v1.PublishResponse; - - /** - * Encodes the specified PublishResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. - * @param message PublishResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.eventarc.publishing.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. - * @param message PublishResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishResponse; - - /** - * Decodes a PublishResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishResponse; - - /** - * Verifies a PublishResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishResponse; - - /** - * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. - * @param message PublishResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.eventarc.publishing.v1.PublishResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishResponse - * @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 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 - } - - /** 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 - } - } - } - - /** 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); - } - - /** 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); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); - } - - /** 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); - } - - /** 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 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 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 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; - } - } -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js deleted file mode 100644 index 232fedd1b00..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.js +++ /dev/null @@ -1,20370 +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_eventarc_publishing_protos || ($protobuf.roots._google_cloud_eventarc_publishing_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.eventarc = (function() { - - /** - * Namespace eventarc. - * @memberof google.cloud - * @namespace - */ - var eventarc = {}; - - eventarc.publishing = (function() { - - /** - * Namespace publishing. - * @memberof google.cloud.eventarc - * @namespace - */ - var publishing = {}; - - publishing.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.eventarc.publishing - * @namespace - */ - var v1 = {}; - - v1.CloudEvent = (function() { - - /** - * Properties of a CloudEvent. - * @memberof google.cloud.eventarc.publishing.v1 - * @interface ICloudEvent - * @property {string|null} [id] CloudEvent id - * @property {string|null} [source] CloudEvent source - * @property {string|null} [specVersion] CloudEvent specVersion - * @property {string|null} [type] CloudEvent type - * @property {Object.|null} [attributes] CloudEvent attributes - * @property {Uint8Array|null} [binaryData] CloudEvent binaryData - * @property {string|null} [textData] CloudEvent textData - * @property {google.protobuf.IAny|null} [protoData] CloudEvent protoData - */ - - /** - * Constructs a new CloudEvent. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a CloudEvent. - * @implements ICloudEvent - * @constructor - * @param {google.cloud.eventarc.publishing.v1.ICloudEvent=} [properties] Properties to set - */ - function CloudEvent(properties) { - this.attributes = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudEvent id. - * @member {string} id - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.id = ""; - - /** - * CloudEvent source. - * @member {string} source - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.source = ""; - - /** - * CloudEvent specVersion. - * @member {string} specVersion - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.specVersion = ""; - - /** - * CloudEvent type. - * @member {string} type - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.type = ""; - - /** - * CloudEvent attributes. - * @member {Object.} attributes - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.attributes = $util.emptyObject; - - /** - * CloudEvent binaryData. - * @member {Uint8Array|null|undefined} binaryData - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.binaryData = null; - - /** - * CloudEvent textData. - * @member {string|null|undefined} textData - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.textData = null; - - /** - * CloudEvent protoData. - * @member {google.protobuf.IAny|null|undefined} protoData - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - CloudEvent.prototype.protoData = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CloudEvent data. - * @member {"binaryData"|"textData"|"protoData"|undefined} data - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - */ - Object.defineProperty(CloudEvent.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["binaryData", "textData", "protoData"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CloudEvent instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {google.cloud.eventarc.publishing.v1.ICloudEvent=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent instance - */ - CloudEvent.create = function create(properties) { - return new CloudEvent(properties); - }; - - /** - * Encodes the specified CloudEvent message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {google.cloud.eventarc.publishing.v1.ICloudEvent} message CloudEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source); - if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.specVersion); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) - for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.binaryData != null && Object.hasOwnProperty.call(message, "binaryData")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.binaryData); - if (message.textData != null && Object.hasOwnProperty.call(message, "textData")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.textData); - if (message.protoData != null && Object.hasOwnProperty.call(message, "protoData")) - $root.google.protobuf.Any.encode(message.protoData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CloudEvent message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {google.cloud.eventarc.publishing.v1.ICloudEvent} message CloudEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudEvent message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.source = reader.string(); - break; - } - case 3: { - message.specVersion = reader.string(); - break; - } - case 4: { - message.type = reader.string(); - break; - } - case 5: { - if (message.attributes === $util.emptyObject) - message.attributes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.attributes[key] = value; - break; - } - case 6: { - message.binaryData = reader.bytes(); - break; - } - case 7: { - message.textData = reader.string(); - break; - } - case 8: { - message.protoData = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudEvent message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.source != null && message.hasOwnProperty("source")) - if (!$util.isString(message.source)) - return "source: string expected"; - if (message.specVersion != null && message.hasOwnProperty("specVersion")) - if (!$util.isString(message.specVersion)) - return "specVersion: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!$util.isObject(message.attributes)) - return "attributes: object expected"; - var key = Object.keys(message.attributes); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify(message.attributes[key[i]]); - if (error) - return "attributes." + error; - } - } - if (message.binaryData != null && message.hasOwnProperty("binaryData")) { - properties.data = 1; - if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) - return "binaryData: buffer expected"; - } - if (message.textData != null && message.hasOwnProperty("textData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - if (!$util.isString(message.textData)) - return "textData: string expected"; - } - if (message.protoData != null && message.hasOwnProperty("protoData")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.google.protobuf.Any.verify(message.protoData); - if (error) - return "protoData." + error; - } - } - return null; - }; - - /** - * Creates a CloudEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent - */ - CloudEvent.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.CloudEvent) - return object; - var message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent(); - if (object.id != null) - message.id = String(object.id); - if (object.source != null) - message.source = String(object.source); - if (object.specVersion != null) - message.specVersion = String(object.specVersion); - if (object.type != null) - message.type = String(object.type); - if (object.attributes) { - if (typeof object.attributes !== "object") - throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.attributes: object expected"); - message.attributes = {}; - for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { - if (typeof object.attributes[keys[i]] !== "object") - throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.attributes: object expected"); - message.attributes[keys[i]] = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.fromObject(object.attributes[keys[i]]); - } - } - if (object.binaryData != null) - if (typeof object.binaryData === "string") - $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); - else if (object.binaryData.length >= 0) - message.binaryData = object.binaryData; - if (object.textData != null) - message.textData = String(object.textData); - if (object.protoData != null) { - if (typeof object.protoData !== "object") - throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.protoData: object expected"); - message.protoData = $root.google.protobuf.Any.fromObject(object.protoData); - } - return message; - }; - - /** - * Creates a plain object from a CloudEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {google.cloud.eventarc.publishing.v1.CloudEvent} message CloudEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.attributes = {}; - if (options.defaults) { - object.id = ""; - object.source = ""; - object.specVersion = ""; - object.type = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.source != null && message.hasOwnProperty("source")) - object.source = message.source; - if (message.specVersion != null && message.hasOwnProperty("specVersion")) - object.specVersion = message.specVersion; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - var keys2; - if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { - object.attributes = {}; - for (var j = 0; j < keys2.length; ++j) - object.attributes[keys2[j]] = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.toObject(message.attributes[keys2[j]], options); - } - if (message.binaryData != null && message.hasOwnProperty("binaryData")) { - object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; - if (options.oneofs) - object.data = "binaryData"; - } - if (message.textData != null && message.hasOwnProperty("textData")) { - object.textData = message.textData; - if (options.oneofs) - object.data = "textData"; - } - if (message.protoData != null && message.hasOwnProperty("protoData")) { - object.protoData = $root.google.protobuf.Any.toObject(message.protoData, options); - if (options.oneofs) - object.data = "protoData"; - } - return object; - }; - - /** - * Converts this CloudEvent to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @instance - * @returns {Object.} JSON object - */ - CloudEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudEvent - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.CloudEvent"; - }; - - CloudEvent.CloudEventAttributeValue = (function() { - - /** - * Properties of a CloudEventAttributeValue. - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @interface ICloudEventAttributeValue - * @property {boolean|null} [ceBoolean] CloudEventAttributeValue ceBoolean - * @property {number|null} [ceInteger] CloudEventAttributeValue ceInteger - * @property {string|null} [ceString] CloudEventAttributeValue ceString - * @property {Uint8Array|null} [ceBytes] CloudEventAttributeValue ceBytes - * @property {string|null} [ceUri] CloudEventAttributeValue ceUri - * @property {string|null} [ceUriRef] CloudEventAttributeValue ceUriRef - * @property {google.protobuf.ITimestamp|null} [ceTimestamp] CloudEventAttributeValue ceTimestamp - */ - - /** - * Constructs a new CloudEventAttributeValue. - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent - * @classdesc Represents a CloudEventAttributeValue. - * @implements ICloudEventAttributeValue - * @constructor - * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue=} [properties] Properties to set - */ - function CloudEventAttributeValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudEventAttributeValue ceBoolean. - * @member {boolean|null|undefined} ceBoolean - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - CloudEventAttributeValue.prototype.ceBoolean = null; - - /** - * CloudEventAttributeValue ceInteger. - * @member {number|null|undefined} ceInteger - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - CloudEventAttributeValue.prototype.ceInteger = null; - - /** - * CloudEventAttributeValue ceString. - * @member {string|null|undefined} ceString - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - CloudEventAttributeValue.prototype.ceString = null; - - /** - * CloudEventAttributeValue ceBytes. - * @member {Uint8Array|null|undefined} ceBytes - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - CloudEventAttributeValue.prototype.ceBytes = null; - - /** - * CloudEventAttributeValue ceUri. - * @member {string|null|undefined} ceUri - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - CloudEventAttributeValue.prototype.ceUri = null; - - /** - * CloudEventAttributeValue ceUriRef. - * @member {string|null|undefined} ceUriRef - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - CloudEventAttributeValue.prototype.ceUriRef = null; - - /** - * CloudEventAttributeValue ceTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} ceTimestamp - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - CloudEventAttributeValue.prototype.ceTimestamp = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CloudEventAttributeValue attr. - * @member {"ceBoolean"|"ceInteger"|"ceString"|"ceBytes"|"ceUri"|"ceUriRef"|"ceTimestamp"|undefined} attr - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - */ - Object.defineProperty(CloudEventAttributeValue.prototype, "attr", { - get: $util.oneOfGetter($oneOfFields = ["ceBoolean", "ceInteger", "ceString", "ceBytes", "ceUri", "ceUriRef", "ceTimestamp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CloudEventAttributeValue instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue instance - */ - CloudEventAttributeValue.create = function create(properties) { - return new CloudEventAttributeValue(properties); - }; - - /** - * Encodes the specified CloudEventAttributeValue message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue} message CloudEventAttributeValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudEventAttributeValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ceBoolean != null && Object.hasOwnProperty.call(message, "ceBoolean")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ceBoolean); - if (message.ceInteger != null && Object.hasOwnProperty.call(message, "ceInteger")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ceInteger); - if (message.ceString != null && Object.hasOwnProperty.call(message, "ceString")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ceString); - if (message.ceBytes != null && Object.hasOwnProperty.call(message, "ceBytes")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.ceBytes); - if (message.ceUri != null && Object.hasOwnProperty.call(message, "ceUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.ceUri); - if (message.ceUriRef != null && Object.hasOwnProperty.call(message, "ceUriRef")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.ceUriRef); - if (message.ceTimestamp != null && Object.hasOwnProperty.call(message, "ceTimestamp")) - $root.google.protobuf.Timestamp.encode(message.ceTimestamp, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CloudEventAttributeValue message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue} message CloudEventAttributeValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudEventAttributeValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudEventAttributeValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudEventAttributeValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ceBoolean = reader.bool(); - break; - } - case 2: { - message.ceInteger = reader.int32(); - break; - } - case 3: { - message.ceString = reader.string(); - break; - } - case 4: { - message.ceBytes = reader.bytes(); - break; - } - case 5: { - message.ceUri = reader.string(); - break; - } - case 6: { - message.ceUriRef = reader.string(); - break; - } - case 7: { - message.ceTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudEventAttributeValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudEventAttributeValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudEventAttributeValue message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudEventAttributeValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ceBoolean != null && message.hasOwnProperty("ceBoolean")) { - properties.attr = 1; - if (typeof message.ceBoolean !== "boolean") - return "ceBoolean: boolean expected"; - } - if (message.ceInteger != null && message.hasOwnProperty("ceInteger")) { - if (properties.attr === 1) - return "attr: multiple values"; - properties.attr = 1; - if (!$util.isInteger(message.ceInteger)) - return "ceInteger: integer expected"; - } - if (message.ceString != null && message.hasOwnProperty("ceString")) { - if (properties.attr === 1) - return "attr: multiple values"; - properties.attr = 1; - if (!$util.isString(message.ceString)) - return "ceString: string expected"; - } - if (message.ceBytes != null && message.hasOwnProperty("ceBytes")) { - if (properties.attr === 1) - return "attr: multiple values"; - properties.attr = 1; - if (!(message.ceBytes && typeof message.ceBytes.length === "number" || $util.isString(message.ceBytes))) - return "ceBytes: buffer expected"; - } - if (message.ceUri != null && message.hasOwnProperty("ceUri")) { - if (properties.attr === 1) - return "attr: multiple values"; - properties.attr = 1; - if (!$util.isString(message.ceUri)) - return "ceUri: string expected"; - } - if (message.ceUriRef != null && message.hasOwnProperty("ceUriRef")) { - if (properties.attr === 1) - return "attr: multiple values"; - properties.attr = 1; - if (!$util.isString(message.ceUriRef)) - return "ceUriRef: string expected"; - } - if (message.ceTimestamp != null && message.hasOwnProperty("ceTimestamp")) { - if (properties.attr === 1) - return "attr: multiple values"; - properties.attr = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.ceTimestamp); - if (error) - return "ceTimestamp." + error; - } - } - return null; - }; - - /** - * Creates a CloudEventAttributeValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue - */ - CloudEventAttributeValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue) - return object; - var message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue(); - if (object.ceBoolean != null) - message.ceBoolean = Boolean(object.ceBoolean); - if (object.ceInteger != null) - message.ceInteger = object.ceInteger | 0; - if (object.ceString != null) - message.ceString = String(object.ceString); - if (object.ceBytes != null) - if (typeof object.ceBytes === "string") - $util.base64.decode(object.ceBytes, message.ceBytes = $util.newBuffer($util.base64.length(object.ceBytes)), 0); - else if (object.ceBytes.length >= 0) - message.ceBytes = object.ceBytes; - if (object.ceUri != null) - message.ceUri = String(object.ceUri); - if (object.ceUriRef != null) - message.ceUriRef = String(object.ceUriRef); - if (object.ceTimestamp != null) { - if (typeof object.ceTimestamp !== "object") - throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.ceTimestamp: object expected"); - message.ceTimestamp = $root.google.protobuf.Timestamp.fromObject(object.ceTimestamp); - } - return message; - }; - - /** - * Creates a plain object from a CloudEventAttributeValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} message CloudEventAttributeValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudEventAttributeValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.ceBoolean != null && message.hasOwnProperty("ceBoolean")) { - object.ceBoolean = message.ceBoolean; - if (options.oneofs) - object.attr = "ceBoolean"; - } - if (message.ceInteger != null && message.hasOwnProperty("ceInteger")) { - object.ceInteger = message.ceInteger; - if (options.oneofs) - object.attr = "ceInteger"; - } - if (message.ceString != null && message.hasOwnProperty("ceString")) { - object.ceString = message.ceString; - if (options.oneofs) - object.attr = "ceString"; - } - if (message.ceBytes != null && message.hasOwnProperty("ceBytes")) { - object.ceBytes = options.bytes === String ? $util.base64.encode(message.ceBytes, 0, message.ceBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.ceBytes) : message.ceBytes; - if (options.oneofs) - object.attr = "ceBytes"; - } - if (message.ceUri != null && message.hasOwnProperty("ceUri")) { - object.ceUri = message.ceUri; - if (options.oneofs) - object.attr = "ceUri"; - } - if (message.ceUriRef != null && message.hasOwnProperty("ceUriRef")) { - object.ceUriRef = message.ceUriRef; - if (options.oneofs) - object.attr = "ceUriRef"; - } - if (message.ceTimestamp != null && message.hasOwnProperty("ceTimestamp")) { - object.ceTimestamp = $root.google.protobuf.Timestamp.toObject(message.ceTimestamp, options); - if (options.oneofs) - object.attr = "ceTimestamp"; - } - return object; - }; - - /** - * Converts this CloudEventAttributeValue to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @instance - * @returns {Object.} JSON object - */ - CloudEventAttributeValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudEventAttributeValue - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudEventAttributeValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue"; - }; - - return CloudEventAttributeValue; - })(); - - return CloudEvent; - })(); - - v1.Publisher = (function() { - - /** - * Constructs a new Publisher service. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a Publisher - * @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 Publisher(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Publisher.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Publisher; - - /** - * Creates new Publisher service using the specified rpc implementation. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @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 {Publisher} RPC service. Useful where requests and/or responses are streamed. - */ - Publisher.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishChannelConnectionEvents}. - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @typedef PublishChannelConnectionEventsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} [response] PublishChannelConnectionEventsResponse - */ - - /** - * Calls PublishChannelConnectionEvents. - * @function publishChannelConnectionEvents - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @instance - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} request PublishChannelConnectionEventsRequest message or plain object - * @param {google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEventsCallback} callback Node-style callback called with the error, if any, and PublishChannelConnectionEventsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.publishChannelConnectionEvents = function publishChannelConnectionEvents(request, callback) { - return this.rpcCall(publishChannelConnectionEvents, $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse, request, callback); - }, "name", { value: "PublishChannelConnectionEvents" }); - - /** - * Calls PublishChannelConnectionEvents. - * @function publishChannelConnectionEvents - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @instance - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} request PublishChannelConnectionEventsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publishEvents}. - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @typedef PublishEventsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.publishing.v1.PublishEventsResponse} [response] PublishEventsResponse - */ - - /** - * Calls PublishEvents. - * @function publishEvents - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @instance - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} request PublishEventsRequest message or plain object - * @param {google.cloud.eventarc.publishing.v1.Publisher.PublishEventsCallback} callback Node-style callback called with the error, if any, and PublishEventsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.publishEvents = function publishEvents(request, callback) { - return this.rpcCall(publishEvents, $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest, $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse, request, callback); - }, "name", { value: "PublishEvents" }); - - /** - * Calls PublishEvents. - * @function publishEvents - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @instance - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} request PublishEventsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publish}. - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @typedef PublishCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.eventarc.publishing.v1.PublishResponse} [response] PublishResponse - */ - - /** - * Calls Publish. - * @function publish - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @instance - * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} request PublishRequest message or plain object - * @param {google.cloud.eventarc.publishing.v1.Publisher.PublishCallback} callback Node-style callback called with the error, if any, and PublishResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.publish = function publish(request, callback) { - return this.rpcCall(publish, $root.google.cloud.eventarc.publishing.v1.PublishRequest, $root.google.cloud.eventarc.publishing.v1.PublishResponse, request, callback); - }, "name", { value: "Publish" }); - - /** - * Calls Publish. - * @function publish - * @memberof google.cloud.eventarc.publishing.v1.Publisher - * @instance - * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} request PublishRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Publisher; - })(); - - v1.PublishChannelConnectionEventsRequest = (function() { - - /** - * Properties of a PublishChannelConnectionEventsRequest. - * @memberof google.cloud.eventarc.publishing.v1 - * @interface IPublishChannelConnectionEventsRequest - * @property {string|null} [channelConnection] PublishChannelConnectionEventsRequest channelConnection - * @property {Array.|null} [events] PublishChannelConnectionEventsRequest events - * @property {Array.|null} [textEvents] PublishChannelConnectionEventsRequest textEvents - */ - - /** - * Constructs a new PublishChannelConnectionEventsRequest. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a PublishChannelConnectionEventsRequest. - * @implements IPublishChannelConnectionEventsRequest - * @constructor - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest=} [properties] Properties to set - */ - function PublishChannelConnectionEventsRequest(properties) { - this.events = []; - this.textEvents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PublishChannelConnectionEventsRequest channelConnection. - * @member {string} channelConnection - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @instance - */ - PublishChannelConnectionEventsRequest.prototype.channelConnection = ""; - - /** - * PublishChannelConnectionEventsRequest events. - * @member {Array.} events - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @instance - */ - PublishChannelConnectionEventsRequest.prototype.events = $util.emptyArray; - - /** - * PublishChannelConnectionEventsRequest textEvents. - * @member {Array.} textEvents - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @instance - */ - PublishChannelConnectionEventsRequest.prototype.textEvents = $util.emptyArray; - - /** - * Creates a new PublishChannelConnectionEventsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest instance - */ - PublishChannelConnectionEventsRequest.create = function create(properties) { - return new PublishChannelConnectionEventsRequest(properties); - }; - - /** - * Encodes the specified PublishChannelConnectionEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} message PublishChannelConnectionEventsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishChannelConnectionEventsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channelConnection != null && Object.hasOwnProperty.call(message, "channelConnection")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channelConnection); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.google.protobuf.Any.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textEvents != null && message.textEvents.length) - for (var i = 0; i < message.textEvents.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.textEvents[i]); - return writer; - }; - - /** - * Encodes the specified PublishChannelConnectionEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest} message PublishChannelConnectionEventsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishChannelConnectionEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishChannelConnectionEventsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channelConnection = reader.string(); - break; - } - case 2: { - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.textEvents && message.textEvents.length)) - message.textEvents = []; - message.textEvents.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublishChannelConnectionEventsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishChannelConnectionEventsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishChannelConnectionEventsRequest message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishChannelConnectionEventsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) - if (!$util.isString(message.channelConnection)) - return "channelConnection: string expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.events[i]); - if (error) - return "events." + error; - } - } - if (message.textEvents != null && message.hasOwnProperty("textEvents")) { - if (!Array.isArray(message.textEvents)) - return "textEvents: array expected"; - for (var i = 0; i < message.textEvents.length; ++i) - if (!$util.isString(message.textEvents[i])) - return "textEvents: string[] expected"; - } - return null; - }; - - /** - * Creates a PublishChannelConnectionEventsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} PublishChannelConnectionEventsRequest - */ - PublishChannelConnectionEventsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) - return object; - var message = new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest(); - if (object.channelConnection != null) - message.channelConnection = String(object.channelConnection); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.events: object expected"); - message.events[i] = $root.google.protobuf.Any.fromObject(object.events[i]); - } - } - if (object.textEvents) { - if (!Array.isArray(object.textEvents)) - throw TypeError(".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.textEvents: array expected"); - message.textEvents = []; - for (var i = 0; i < object.textEvents.length; ++i) - message.textEvents[i] = String(object.textEvents[i]); - } - return message; - }; - - /** - * Creates a plain object from a PublishChannelConnectionEventsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest} message PublishChannelConnectionEventsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishChannelConnectionEventsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.events = []; - object.textEvents = []; - } - if (options.defaults) - object.channelConnection = ""; - if (message.channelConnection != null && message.hasOwnProperty("channelConnection")) - object.channelConnection = message.channelConnection; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.google.protobuf.Any.toObject(message.events[j], options); - } - if (message.textEvents && message.textEvents.length) { - object.textEvents = []; - for (var j = 0; j < message.textEvents.length; ++j) - object.textEvents[j] = message.textEvents[j]; - } - return object; - }; - - /** - * Converts this PublishChannelConnectionEventsRequest to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @instance - * @returns {Object.} JSON object - */ - PublishChannelConnectionEventsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishChannelConnectionEventsRequest - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishChannelConnectionEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest"; - }; - - return PublishChannelConnectionEventsRequest; - })(); - - v1.PublishChannelConnectionEventsResponse = (function() { - - /** - * Properties of a PublishChannelConnectionEventsResponse. - * @memberof google.cloud.eventarc.publishing.v1 - * @interface IPublishChannelConnectionEventsResponse - */ - - /** - * Constructs a new PublishChannelConnectionEventsResponse. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a PublishChannelConnectionEventsResponse. - * @implements IPublishChannelConnectionEventsResponse - * @constructor - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse=} [properties] Properties to set - */ - function PublishChannelConnectionEventsResponse(properties) { - if (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 PublishChannelConnectionEventsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse instance - */ - PublishChannelConnectionEventsResponse.create = function create(properties) { - return new PublishChannelConnectionEventsResponse(properties); - }; - - /** - * Encodes the specified PublishChannelConnectionEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse} message PublishChannelConnectionEventsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishChannelConnectionEventsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PublishChannelConnectionEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse} message PublishChannelConnectionEventsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishChannelConnectionEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishChannelConnectionEventsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublishChannelConnectionEventsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishChannelConnectionEventsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishChannelConnectionEventsResponse message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishChannelConnectionEventsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PublishChannelConnectionEventsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} PublishChannelConnectionEventsResponse - */ - PublishChannelConnectionEventsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse) - return object; - return new $root.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse(); - }; - - /** - * Creates a plain object from a PublishChannelConnectionEventsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse} message PublishChannelConnectionEventsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishChannelConnectionEventsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PublishChannelConnectionEventsResponse to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @instance - * @returns {Object.} JSON object - */ - PublishChannelConnectionEventsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishChannelConnectionEventsResponse - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishChannelConnectionEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse"; - }; - - return PublishChannelConnectionEventsResponse; - })(); - - v1.PublishEventsRequest = (function() { - - /** - * Properties of a PublishEventsRequest. - * @memberof google.cloud.eventarc.publishing.v1 - * @interface IPublishEventsRequest - * @property {string|null} [channel] PublishEventsRequest channel - * @property {Array.|null} [events] PublishEventsRequest events - * @property {Array.|null} [textEvents] PublishEventsRequest textEvents - */ - - /** - * Constructs a new PublishEventsRequest. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a PublishEventsRequest. - * @implements IPublishEventsRequest - * @constructor - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest=} [properties] Properties to set - */ - function PublishEventsRequest(properties) { - this.events = []; - this.textEvents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PublishEventsRequest channel. - * @member {string} channel - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @instance - */ - PublishEventsRequest.prototype.channel = ""; - - /** - * PublishEventsRequest events. - * @member {Array.} events - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @instance - */ - PublishEventsRequest.prototype.events = $util.emptyArray; - - /** - * PublishEventsRequest textEvents. - * @member {Array.} textEvents - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @instance - */ - PublishEventsRequest.prototype.textEvents = $util.emptyArray; - - /** - * Creates a new PublishEventsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest instance - */ - PublishEventsRequest.create = function create(properties) { - return new PublishEventsRequest(properties); - }; - - /** - * Encodes the specified PublishEventsRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} message PublishEventsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishEventsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.google.protobuf.Any.encode(message.events[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textEvents != null && message.textEvents.length) - for (var i = 0; i < message.textEvents.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.textEvents[i]); - return writer; - }; - - /** - * Encodes the specified PublishEventsRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsRequest} message PublishEventsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublishEventsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishEventsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.channel = reader.string(); - break; - } - case 2: { - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.textEvents && message.textEvents.length)) - message.textEvents = []; - message.textEvents.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublishEventsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishEventsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishEventsRequest message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishEventsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.events[i]); - if (error) - return "events." + error; - } - } - if (message.textEvents != null && message.hasOwnProperty("textEvents")) { - if (!Array.isArray(message.textEvents)) - return "textEvents: array expected"; - for (var i = 0; i < message.textEvents.length; ++i) - if (!$util.isString(message.textEvents[i])) - return "textEvents: string[] expected"; - } - return null; - }; - - /** - * Creates a PublishEventsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsRequest} PublishEventsRequest - */ - PublishEventsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest) - return object; - var message = new $root.google.cloud.eventarc.publishing.v1.PublishEventsRequest(); - if (object.channel != null) - message.channel = String(object.channel); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".google.cloud.eventarc.publishing.v1.PublishEventsRequest.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".google.cloud.eventarc.publishing.v1.PublishEventsRequest.events: object expected"); - message.events[i] = $root.google.protobuf.Any.fromObject(object.events[i]); - } - } - if (object.textEvents) { - if (!Array.isArray(object.textEvents)) - throw TypeError(".google.cloud.eventarc.publishing.v1.PublishEventsRequest.textEvents: array expected"); - message.textEvents = []; - for (var i = 0; i < object.textEvents.length; ++i) - message.textEvents[i] = String(object.textEvents[i]); - } - return message; - }; - - /** - * Creates a plain object from a PublishEventsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.PublishEventsRequest} message PublishEventsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishEventsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.events = []; - object.textEvents = []; - } - if (options.defaults) - object.channel = ""; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.google.protobuf.Any.toObject(message.events[j], options); - } - if (message.textEvents && message.textEvents.length) { - object.textEvents = []; - for (var j = 0; j < message.textEvents.length; ++j) - object.textEvents[j] = message.textEvents[j]; - } - return object; - }; - - /** - * Converts this PublishEventsRequest to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @instance - * @returns {Object.} JSON object - */ - PublishEventsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishEventsRequest - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishEventsRequest"; - }; - - return PublishEventsRequest; - })(); - - v1.PublishEventsResponse = (function() { - - /** - * Properties of a PublishEventsResponse. - * @memberof google.cloud.eventarc.publishing.v1 - * @interface IPublishEventsResponse - */ - - /** - * Constructs a new PublishEventsResponse. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a PublishEventsResponse. - * @implements IPublishEventsResponse - * @constructor - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse=} [properties] Properties to set - */ - function PublishEventsResponse(properties) { - if (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 PublishEventsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse instance - */ - PublishEventsResponse.create = function create(properties) { - return new PublishEventsResponse(properties); - }; - - /** - * Encodes the specified PublishEventsResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse} message PublishEventsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishEventsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PublishEventsResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishEventsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishEventsResponse} message PublishEventsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublishEventsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishEventsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublishEventsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishEventsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishEventsResponse message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishEventsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PublishEventsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.PublishEventsResponse} PublishEventsResponse - */ - PublishEventsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse) - return object; - return new $root.google.cloud.eventarc.publishing.v1.PublishEventsResponse(); - }; - - /** - * Creates a plain object from a PublishEventsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.PublishEventsResponse} message PublishEventsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishEventsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PublishEventsResponse to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @instance - * @returns {Object.} JSON object - */ - PublishEventsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishEventsResponse - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.PublishEventsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishEventsResponse"; - }; - - return PublishEventsResponse; - })(); - - v1.PublishRequest = (function() { - - /** - * Properties of a PublishRequest. - * @memberof google.cloud.eventarc.publishing.v1 - * @interface IPublishRequest - * @property {string|null} [messageBus] PublishRequest messageBus - * @property {google.cloud.eventarc.publishing.v1.ICloudEvent|null} [protoMessage] PublishRequest protoMessage - * @property {string|null} [jsonMessage] PublishRequest jsonMessage - * @property {Uint8Array|null} [avroMessage] PublishRequest avroMessage - */ - - /** - * Constructs a new PublishRequest. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a PublishRequest. - * @implements IPublishRequest - * @constructor - * @param {google.cloud.eventarc.publishing.v1.IPublishRequest=} [properties] Properties to set - */ - function PublishRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PublishRequest messageBus. - * @member {string} messageBus - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @instance - */ - PublishRequest.prototype.messageBus = ""; - - /** - * PublishRequest protoMessage. - * @member {google.cloud.eventarc.publishing.v1.ICloudEvent|null|undefined} protoMessage - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @instance - */ - PublishRequest.prototype.protoMessage = null; - - /** - * PublishRequest jsonMessage. - * @member {string|null|undefined} jsonMessage - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @instance - */ - PublishRequest.prototype.jsonMessage = null; - - /** - * PublishRequest avroMessage. - * @member {Uint8Array|null|undefined} avroMessage - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @instance - */ - PublishRequest.prototype.avroMessage = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PublishRequest format. - * @member {"protoMessage"|"jsonMessage"|"avroMessage"|undefined} format - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @instance - */ - Object.defineProperty(PublishRequest.prototype, "format", { - get: $util.oneOfGetter($oneOfFields = ["protoMessage", "jsonMessage", "avroMessage"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PublishRequest instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishRequest=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest instance - */ - PublishRequest.create = function create(properties) { - return new PublishRequest(properties); - }; - - /** - * Encodes the specified PublishRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} message PublishRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageBus != null && Object.hasOwnProperty.call(message, "messageBus")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageBus); - if (message.protoMessage != null && Object.hasOwnProperty.call(message, "protoMessage")) - $root.google.cloud.eventarc.publishing.v1.CloudEvent.encode(message.protoMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.jsonMessage != null && Object.hasOwnProperty.call(message, "jsonMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.jsonMessage); - if (message.avroMessage != null && Object.hasOwnProperty.call(message, "avroMessage")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.avroMessage); - return writer; - }; - - /** - * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} message PublishRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublishRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageBus = reader.string(); - break; - } - case 2: { - message.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.decode(reader, reader.uint32()); - break; - } - case 3: { - message.jsonMessage = reader.string(); - break; - } - case 4: { - message.avroMessage = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublishRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishRequest message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.messageBus != null && message.hasOwnProperty("messageBus")) - if (!$util.isString(message.messageBus)) - return "messageBus: string expected"; - if (message.protoMessage != null && message.hasOwnProperty("protoMessage")) { - properties.format = 1; - { - var error = $root.google.cloud.eventarc.publishing.v1.CloudEvent.verify(message.protoMessage); - if (error) - return "protoMessage." + error; - } - } - if (message.jsonMessage != null && message.hasOwnProperty("jsonMessage")) { - if (properties.format === 1) - return "format: multiple values"; - properties.format = 1; - if (!$util.isString(message.jsonMessage)) - return "jsonMessage: string expected"; - } - if (message.avroMessage != null && message.hasOwnProperty("avroMessage")) { - if (properties.format === 1) - return "format: multiple values"; - properties.format = 1; - if (!(message.avroMessage && typeof message.avroMessage.length === "number" || $util.isString(message.avroMessage))) - return "avroMessage: buffer expected"; - } - return null; - }; - - /** - * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest - */ - PublishRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishRequest) - return object; - var message = new $root.google.cloud.eventarc.publishing.v1.PublishRequest(); - if (object.messageBus != null) - message.messageBus = String(object.messageBus); - if (object.protoMessage != null) { - if (typeof object.protoMessage !== "object") - throw TypeError(".google.cloud.eventarc.publishing.v1.PublishRequest.protoMessage: object expected"); - message.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.fromObject(object.protoMessage); - } - if (object.jsonMessage != null) - message.jsonMessage = String(object.jsonMessage); - if (object.avroMessage != null) - if (typeof object.avroMessage === "string") - $util.base64.decode(object.avroMessage, message.avroMessage = $util.newBuffer($util.base64.length(object.avroMessage)), 0); - else if (object.avroMessage.length >= 0) - message.avroMessage = object.avroMessage; - return message; - }; - - /** - * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {google.cloud.eventarc.publishing.v1.PublishRequest} message PublishRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.messageBus = ""; - if (message.messageBus != null && message.hasOwnProperty("messageBus")) - object.messageBus = message.messageBus; - if (message.protoMessage != null && message.hasOwnProperty("protoMessage")) { - object.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.toObject(message.protoMessage, options); - if (options.oneofs) - object.format = "protoMessage"; - } - if (message.jsonMessage != null && message.hasOwnProperty("jsonMessage")) { - object.jsonMessage = message.jsonMessage; - if (options.oneofs) - object.format = "jsonMessage"; - } - if (message.avroMessage != null && message.hasOwnProperty("avroMessage")) { - object.avroMessage = options.bytes === String ? $util.base64.encode(message.avroMessage, 0, message.avroMessage.length) : options.bytes === Array ? Array.prototype.slice.call(message.avroMessage) : message.avroMessage; - if (options.oneofs) - object.format = "avroMessage"; - } - return object; - }; - - /** - * Converts this PublishRequest to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @instance - * @returns {Object.} JSON object - */ - PublishRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishRequest - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.PublishRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishRequest"; - }; - - return PublishRequest; - })(); - - v1.PublishResponse = (function() { - - /** - * Properties of a PublishResponse. - * @memberof google.cloud.eventarc.publishing.v1 - * @interface IPublishResponse - */ - - /** - * Constructs a new PublishResponse. - * @memberof google.cloud.eventarc.publishing.v1 - * @classdesc Represents a PublishResponse. - * @implements IPublishResponse - * @constructor - * @param {google.cloud.eventarc.publishing.v1.IPublishResponse=} [properties] Properties to set - */ - function PublishResponse(properties) { - if (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 PublishResponse instance using the specified properties. - * @function create - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishResponse=} [properties] Properties to set - * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse instance - */ - PublishResponse.create = function create(properties) { - return new PublishResponse(properties); - }; - - /** - * Encodes the specified PublishResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishResponse} message PublishResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.IPublishResponse} message PublishResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PublishResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublishResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishResponse message. - * @function verify - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse - */ - PublishResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishResponse) - return object; - return new $root.google.cloud.eventarc.publishing.v1.PublishResponse(); - }; - - /** - * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {google.cloud.eventarc.publishing.v1.PublishResponse} message PublishResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PublishResponse to JSON. - * @function toJSON - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @instance - * @returns {Object.} JSON object - */ - PublishResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishResponse - * @function getTypeUrl - * @memberof google.cloud.eventarc.publishing.v1.PublishResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishResponse"; - }; - - return PublishResponse; - })(); - - return v1; - })(); - - return publishing; - })(); - - return eventarc; - })(); - - 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.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; - })(); - - 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; - })(); - - 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 - */ - - /** - * 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 = []; - if (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; - - /** - * 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(); - 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; - } - 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; - } - } - 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]); - } - } - 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 = []; - 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); - } - 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 - */ - - /** - * 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; - - /** - * 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(); - 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; - } - 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; - } - } - 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]); - } - } - 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; - } - 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); - } - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; - - /** - * 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.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); - } - 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.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.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 - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - 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.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.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.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; - })(); - - return protobuf; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json deleted file mode 100644 index f4956478fb5..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/protos.json +++ /dev/null @@ -1,2057 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "eventarc": { - "nested": { - "publishing": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.Eventarc.Publishing.V1", - "go_package": "cloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb", - "java_multiple_files": true, - "java_outer_classname": "PublisherProto", - "java_package": "com.google.cloud.eventarc.publishing.v1", - "php_namespace": "Google\\Cloud\\Eventarc\\Publishing\\V1", - "ruby_package": "Google::Cloud::Eventarc::Publishing::V1" - }, - "nested": { - "CloudEvent": { - "oneofs": { - "data": { - "oneof": [ - "binaryData", - "textData", - "protoData" - ] - } - }, - "fields": { - "id": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "source": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "specVersion": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "attributes": { - "keyType": "string", - "type": "CloudEventAttributeValue", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "binaryData": { - "type": "bytes", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "textData": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "protoData": { - "type": "google.protobuf.Any", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "CloudEventAttributeValue": { - "oneofs": { - "attr": { - "oneof": [ - "ceBoolean", - "ceInteger", - "ceString", - "ceBytes", - "ceUri", - "ceUriRef", - "ceTimestamp" - ] - } - }, - "fields": { - "ceBoolean": { - "type": "bool", - "id": 1 - }, - "ceInteger": { - "type": "int32", - "id": 2 - }, - "ceString": { - "type": "string", - "id": 3 - }, - "ceBytes": { - "type": "bytes", - "id": 4 - }, - "ceUri": { - "type": "string", - "id": 5 - }, - "ceUriRef": { - "type": "string", - "id": 6 - }, - "ceTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 7 - } - } - } - } - }, - "Publisher": { - "options": { - "(google.api.default_host)": "eventarcpublishing.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "PublishChannelConnectionEvents": { - "requestType": "PublishChannelConnectionEventsRequest", - "responseType": "PublishChannelConnectionEventsResponse", - "options": { - "(google.api.http).post": "/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents", - "body": "*" - } - } - ] - }, - "PublishEvents": { - "requestType": "PublishEventsRequest", - "responseType": "PublishEventsResponse", - "options": { - "(google.api.http).post": "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{channel=projects/*/locations/*/channels/*}:publishEvents", - "body": "*" - } - } - ] - }, - "Publish": { - "requestType": "PublishRequest", - "responseType": "PublishResponse", - "options": { - "(google.api.http).post": "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish", - "body": "*" - } - } - ] - } - } - }, - "PublishChannelConnectionEventsRequest": { - "fields": { - "channelConnection": { - "type": "string", - "id": 1 - }, - "events": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 2 - }, - "textEvents": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "PublishChannelConnectionEventsResponse": { - "fields": {} - }, - "PublishEventsRequest": { - "fields": { - "channel": { - "type": "string", - "id": 1 - }, - "events": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 2 - }, - "textEvents": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "PublishEventsResponse": { - "fields": {} - }, - "PublishRequest": { - "oneofs": { - "format": { - "oneof": [ - "protoMessage", - "jsonMessage", - "avroMessage" - ] - } - }, - "fields": { - "messageBus": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "protoMessage": { - "type": "CloudEvent", - "id": 2 - }, - "jsonMessage": { - "type": "string", - "id": 3 - }, - "avroMessage": { - "type": "bytes", - "id": 4 - } - } - }, - "PublishResponse": { - "fields": {} - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "FieldInfoProto", - "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 - } - }, - "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 - } - }, - "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 - } - } - } - } - } - }, - "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 - } - } - } - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js deleted file mode 100644 index efae9b737e7..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_channel_connection_events.js +++ /dev/null @@ -1,74 +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() { - // [START eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_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. - */ - /** - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - */ - // const channelConnection = 'abc123' - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - */ - // const events = [1,2,3,4] - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - */ - // const textEvents = ['abc','def'] - - // Imports the Publishing library - const {PublisherClient} = require('@google-cloud/eventarc-publishing').v1; - - // Instantiates a client - const publishingClient = new PublisherClient(); - - async function callPublishChannelConnectionEvents() { - // Construct request - const request = { - }; - - // Run request - const response = await publishingClient.publishChannelConnectionEvents(request); - console.log(response); - } - - callPublishChannelConnectionEvents(); - // [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_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-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js deleted file mode 100644 index 389b5611c05..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish_events.js +++ /dev/null @@ -1,74 +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() { - // [START eventarcpublishing_v1_generated_Publisher_PublishEvents_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. - */ - /** - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - */ - // const channel = 'abc123' - /** - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - */ - // const events = [1,2,3,4] - /** - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - */ - // const textEvents = ['abc','def'] - - // Imports the Publishing library - const {PublisherClient} = require('@google-cloud/eventarc-publishing').v1; - - // Instantiates a client - const publishingClient = new PublisherClient(); - - async function callPublishEvents() { - // Construct request - const request = { - }; - - // Run request - const response = await publishingClient.publishEvents(request); - console.log(response); - } - - callPublishEvents(); - // [END eventarcpublishing_v1_generated_Publisher_PublishEvents_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-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json deleted file mode 100644 index 9a134183930..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-publishing", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.eventarc.publishing.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_async", - "title": "Publisher publishChannelConnectionEvents Sample", - "origin": "API_DEFINITION", - "description": " Publish events to a ChannelConnection in a partner's project.", - "canonical": true, - "file": "publisher.publish_channel_connection_events.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PublishChannelConnectionEvents", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", - "async": true, - "parameters": [ - { - "name": "channel_connection", - "type": "TYPE_STRING" - }, - { - "name": "events", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "text_events", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse", - "client": { - "shortName": "PublisherClient", - "fullName": "google.cloud.eventarc.publishing.v1.PublisherClient" - }, - "method": { - "shortName": "PublishChannelConnectionEvents", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", - "service": { - "shortName": "Publisher", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher" - } - } - } - }, - { - "regionTag": "eventarcpublishing_v1_generated_Publisher_PublishEvents_async", - "title": "Publisher publishEvents Sample", - "origin": "API_DEFINITION", - "description": " Publish events to a subscriber's channel.", - "canonical": true, - "file": "publisher.publish_events.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PublishEvents", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", - "async": true, - "parameters": [ - { - "name": "channel", - "type": "TYPE_STRING" - }, - { - "name": "events", - "type": "TYPE_MESSAGE[]" - }, - { - "name": "text_events", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.eventarc.publishing.v1.PublishEventsResponse", - "client": { - "shortName": "PublisherClient", - "fullName": "google.cloud.eventarc.publishing.v1.PublisherClient" - }, - "method": { - "shortName": "PublishEvents", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", - "service": { - "shortName": "Publisher", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher" - } - } - } - }, - { - "regionTag": "eventarcpublishing_v1_generated_Publisher_Publish_async", - "title": "Publisher publish Sample", - "origin": "API_DEFINITION", - "description": " Publish events to a message bus.", - "canonical": true, - "file": "publisher.publish.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "Publish", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher.Publish", - "async": true, - "parameters": [ - { - "name": "message_bus", - "type": "TYPE_STRING" - }, - { - "name": "proto_message", - "type": ".google.cloud.eventarc.publishing.v1.CloudEvent" - }, - { - "name": "json_message", - "type": "TYPE_STRING" - }, - { - "name": "avro_message", - "type": "TYPE_BYTES" - } - ], - "resultType": ".google.cloud.eventarc.publishing.v1.PublishResponse", - "client": { - "shortName": "PublisherClient", - "fullName": "google.cloud.eventarc.publishing.v1.PublisherClient" - }, - "method": { - "shortName": "Publish", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher.Publish", - "service": { - "shortName": "Publisher", - "fullName": "google.cloud.eventarc.publishing.v1.Publisher" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/index.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/index.ts deleted file mode 100644 index f0fe1131fd2..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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 PublisherClient = v1.PublisherClient; -type PublisherClient = v1.PublisherClient; -export {v1, PublisherClient}; -export default {v1, PublisherClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json deleted file mode 100644 index ec79a2d0cd8..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.eventarc.publishing.v1", - "libraryPackage": "@google-cloud/eventarc-publishing", - "services": { - "Publisher": { - "clients": { - "grpc": { - "libraryClient": "PublisherClient", - "rpcs": { - "PublishChannelConnectionEvents": { - "methods": [ - "publishChannelConnectionEvents" - ] - }, - "PublishEvents": { - "methods": [ - "publishEvents" - ] - }, - "Publish": { - "methods": [ - "publish" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "PublisherClient", - "rpcs": { - "PublishChannelConnectionEvents": { - "methods": [ - "publishChannelConnectionEvents" - ] - }, - "PublishEvents": { - "methods": [ - "publishEvents" - ] - }, - "Publish": { - "methods": [ - "publish" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/index.ts deleted file mode 100644 index fe93c45dfe7..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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 {PublisherClient} from './publisher_client'; diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts deleted file mode 100644 index e7036fa378f..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client.ts +++ /dev/null @@ -1,600 +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} from 'google-gax'; - -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1/publisher_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './publisher_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Eventarc processes events generated by an event provider and delivers them to - * a subscriber. - * - * An event provider is a software-as-a-service (SaaS) system or - * product that can generate and deliver events through Eventarc. - * - * A third-party event provider is an event provider from outside of Google. - * - * A partner is a third-party event provider that is integrated with Eventarc. - * - * A subscriber is a GCP customer interested in receiving events. - * - * Channel is a first-class Eventarc resource that is created and managed - * by the subscriber in their GCP project. A Channel represents a subscriber's - * intent to receive events from an event provider. A Channel is associated with - * exactly one event provider. - * - * ChannelConnection is a first-class Eventarc resource that - * is created and managed by the partner in their GCP project. A - * ChannelConnection represents a connection between a partner and a - * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a - * Channel. - * - * Publisher allows an event provider to publish events to Eventarc. - * @class - * @memberof v1 - */ -export class PublisherClient { - 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}; - publisherStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of PublisherClient. - * - * @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 PublisherClient({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 PublisherClient; - 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 = 'eventarcpublishing.' + this._universeDomain; - const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - - // Request numeric enum values if REST transport is used. - opts.numericEnums = true; - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [ - `gax/${this._gaxModule.version}`, - `gapic/${version}`, - ]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.eventarc.publishing.v1.Publisher', 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.publisherStub) { - return this.publisherStub; - } - - // Put together the "service stub" for - // google.cloud.eventarc.publishing.v1.Publisher. - this.publisherStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.eventarc.publishing.v1.Publisher') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.eventarc.publishing.v1.Publisher, - 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 publisherStubMethods = - ['publishChannelConnectionEvents', 'publishEvents', 'publish']; - for (const methodName of publisherStubMethods) { - const callPromise = this.publisherStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.publisherStub; - } - - /** - * 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 'eventarcpublishing.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 'eventarcpublishing.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 -- - // ------------------- -/** - * Publish events to a ChannelConnection in a partner's project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.channelConnection - * The channel_connection that the events are published from. For example: - * `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - * @param {number[]} request.events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @param {string[]} request.textEvents - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.eventarc.publishing.v1.PublishChannelConnectionEventsResponse|PublishChannelConnectionEventsResponse}. - * 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/publisher.publish_channel_connection_events.js - * region_tag:eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_async - */ - publishChannelConnectionEvents( - request?: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|undefined, {}|undefined - ]>; - publishChannelConnectionEvents( - request: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, - {}|null|undefined>): void; - publishChannelConnectionEvents( - request: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, - callback: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, - {}|null|undefined>): void; - publishChannelConnectionEvents( - request?: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'channel_connection': request.channelConnection ?? '', - }); - this.initialize(); - return this.innerApiCalls.publishChannelConnectionEvents(request, options, callback); - } -/** - * Publish events to a subscriber's channel. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.channel - * The full name of the channel to publish to. For example: - * `projects/{project}/locations/{location}/channels/{channel-id}`. - * @param {number[]} request.events - * The CloudEvents v1.0 events to publish. No other types are allowed. - * If this field is set, then the `text_events` fields must not be set. - * @param {string[]} request.textEvents - * The text representation of events to publish. - * CloudEvent v1.0 in JSON format is the only allowed type. Refer to - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * for specification. - * If this field is set, then the `events` fields must not be set. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.eventarc.publishing.v1.PublishEventsResponse|PublishEventsResponse}. - * 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/publisher.publish_events.js - * region_tag:eventarcpublishing_v1_generated_Publisher_PublishEvents_async - */ - publishEvents( - request?: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|undefined, {}|undefined - ]>; - publishEvents( - request: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, - {}|null|undefined>): void; - publishEvents( - request: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, - callback: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, - {}|null|undefined>): void; - publishEvents( - request?: protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishEventsRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'channel': request.channel ?? '', - }); - this.initialize(); - return this.innerApiCalls.publishEvents(request, options, callback); - } -/** - * Publish events to a message bus. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.messageBus - * Required. The full name of the message bus to publish events to. Format: - * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - * @param {google.cloud.eventarc.publishing.v1.CloudEvent} request.protoMessage - * The Protobuf format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - * @param {string} request.jsonMessage - * The JSON format of the CloudEvent being published. Specification can be - * found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - * @param {Buffer} request.avroMessage - * The Avro format of the CloudEvent being published. Specification can - * be found here: - * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.eventarc.publishing.v1.PublishResponse|PublishResponse}. - * 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/publisher.publish.js - * region_tag:eventarcpublishing_v1_generated_Publisher_Publish_async - */ - publish( - request?: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.eventarc.publishing.v1.IPublishResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishRequest|undefined, {}|undefined - ]>; - publish( - request: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, - {}|null|undefined>): void; - publish( - request: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, - callback: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, - {}|null|undefined>): void; - publish( - request?: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.eventarc.publishing.v1.IPublishResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.eventarc.publishing.v1.IPublishResponse, - protos.google.cloud.eventarc.publishing.v1.IPublishRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'message_bus': request.messageBus ?? '', - }); - this.initialize(); - return this.innerApiCalls.publish(request, options, callback); - } - - - /** - * 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.publisherStub && !this._terminated) { - return this.publisherStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json deleted file mode 100644 index d364c8bb2b7..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_client_config.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "interfaces": { - "google.cloud.eventarc.publishing.v1.Publisher": { - "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": { - "PublishChannelConnectionEvents": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "PublishEvents": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "Publish": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json deleted file mode 100644 index d651cd130b2..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/src/v1/publisher_proto_list.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "../../protos/google/cloud/eventarc/publishing/v1/cloud_event.proto", - "../../protos/google/cloud/eventarc/publishing/v1/publisher.proto" -] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index c3ba6bde1c8..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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 publishing = require('@google-cloud/eventarc-publishing'); - -function main() { - const publisherClient = new publishing.PublisherClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 975fda121d8..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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 {PublisherClient} from '@google-cloud/eventarc-publishing'; - -// check that the client class type name can be used -function doStuffWithPublisherClient(client: PublisherClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const publisherClient = new PublisherClient(); - doStuffWithPublisherClient(publisherClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/install.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/test/gapic_publisher_v1.ts b/owl-bot-staging/google-cloud-eventarc-publishing/v1/test/gapic_publisher_v1.ts deleted file mode 100644 index 8486b5c2c58..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/v1/test/gapic_publisher_v1.ts +++ /dev/null @@ -1,538 +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 publisherModule from '../src'; - -import {protobuf} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -describe('v1.PublisherClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new publisherModule.v1.PublisherClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'eventarcpublishing.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new publisherModule.v1.PublisherClient(); - 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 = publisherModule.v1.PublisherClient.servicePath; - assert.strictEqual(servicePath, 'eventarcpublishing.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = publisherModule.v1.PublisherClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'eventarcpublishing.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new publisherModule.v1.PublisherClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'eventarcpublishing.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new publisherModule.v1.PublisherClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'eventarcpublishing.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 publisherModule.v1.PublisherClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'eventarcpublishing.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 publisherModule.v1.PublisherClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'eventarcpublishing.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 publisherModule.v1.PublisherClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = publisherModule.v1.PublisherClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new publisherModule.v1.PublisherClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new publisherModule.v1.PublisherClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.publisherStub, undefined); - await client.initialize(); - assert(client.publisherStub); - }); - - it('has close method for the initialized client', done => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.publisherStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.publisherStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new publisherModule.v1.PublisherClient({ - 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 publisherModule.v1.PublisherClient({ - 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('publishChannelConnectionEvents', () => { - it('invokes publishChannelConnectionEvents without error', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); - request.channelConnection = defaultValue1; - const expectedHeaderRequestParams = `channel_connection=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse() - ); - client.innerApiCalls.publishChannelConnectionEvents = stubSimpleCall(expectedResponse); - const [response] = await client.publishChannelConnectionEvents(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publishChannelConnectionEvents without error using callback', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); - request.channelConnection = defaultValue1; - const expectedHeaderRequestParams = `channel_connection=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse() - ); - client.innerApiCalls.publishChannelConnectionEvents = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.publishChannelConnectionEvents( - request, - (err?: Error|null, result?: protos.google.cloud.eventarc.publishing.v1.IPublishChannelConnectionEventsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publishChannelConnectionEvents with error', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); - request.channelConnection = defaultValue1; - const expectedHeaderRequestParams = `channel_connection=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.publishChannelConnectionEvents = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.publishChannelConnectionEvents(request), expectedError); - const actualRequest = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publishChannelConnectionEvents as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publishChannelConnectionEvents with closed client', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest', ['channelConnection']); - request.channelConnection = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.publishChannelConnectionEvents(request), expectedError); - }); - }); - - describe('publishEvents', () => { - it('invokes publishEvents without error', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); - request.channel = defaultValue1; - const expectedHeaderRequestParams = `channel=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishEventsResponse() - ); - client.innerApiCalls.publishEvents = stubSimpleCall(expectedResponse); - const [response] = await client.publishEvents(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.publishEvents as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publishEvents as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publishEvents without error using callback', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); - request.channel = defaultValue1; - const expectedHeaderRequestParams = `channel=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishEventsResponse() - ); - client.innerApiCalls.publishEvents = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.publishEvents( - request, - (err?: Error|null, result?: protos.google.cloud.eventarc.publishing.v1.IPublishEventsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.publishEvents as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publishEvents as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publishEvents with error', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); - request.channel = defaultValue1; - const expectedHeaderRequestParams = `channel=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.publishEvents = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.publishEvents(request), expectedError); - const actualRequest = (client.innerApiCalls.publishEvents as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publishEvents as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publishEvents with closed client', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishEventsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishEventsRequest', ['channel']); - request.channel = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.publishEvents(request), expectedError); - }); - }); - - describe('publish', () => { - it('invokes publish without error', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); - request.messageBus = defaultValue1; - const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishResponse() - ); - client.innerApiCalls.publish = stubSimpleCall(expectedResponse); - const [response] = await client.publish(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.publish as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publish as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publish without error using callback', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); - request.messageBus = defaultValue1; - const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishResponse() - ); - client.innerApiCalls.publish = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.publish( - request, - (err?: Error|null, result?: protos.google.cloud.eventarc.publishing.v1.IPublishResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.publish as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publish as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publish with error', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); - request.messageBus = defaultValue1; - const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.publish = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.publish(request), expectedError); - const actualRequest = (client.innerApiCalls.publish as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.publish as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes publish with closed client', async () => { - const client = new publisherModule.v1.PublisherClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.eventarc.publishing.v1.PublishRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.eventarc.publishing.v1.PublishRequest', ['messageBus']); - request.messageBus = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.publish(request), expectedError); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/tsconfig.json b/owl-bot-staging/google-cloud-eventarc-publishing/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/v1/webpack.config.js b/owl-bot-staging/google-cloud-eventarc-publishing/v1/webpack.config.js deleted file mode 100644 index 6c9705ec65e..00000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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: 'Publisher', - filename: './publisher.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-securitycentermanagement/v1/.eslintignore b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/.eslintrc.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/.gitignore b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/.jsdoc.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.jsdoc.js deleted file mode 100644 index 61b4b8a20ef..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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/securitycentermanagement', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/.mocharc.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/.prettierrc.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/README.md b/owl-bot-staging/google-cloud-securitycentermanagement/v1/README.md deleted file mode 100644 index c4f3fec2035..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Securitycentermanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json deleted file mode 100644 index 73b37062d3a..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/securitycentermanagement", - "version": "0.1.0", - "description": "Securitycentermanagement client for Node.js", - "repository": "googleapis/nodejs-securitycentermanagement", - "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 securitycentermanagement", - "securitycentermanagement", - "security center management" - ], - "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-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto deleted file mode 100644 index ff623fef501..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto +++ /dev/null @@ -1,1796 +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.securitycentermanagement.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/type/expr.proto"; - -option csharp_namespace = "Google.Cloud.SecurityCenterManagement.V1"; -option go_package = "cloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb;securitycentermanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "SecurityCenterManagementProto"; -option java_package = "com.google.cloud.securitycentermanagement.v1"; -option php_namespace = "Google\\Cloud\\SecurityCenterManagement\\V1"; -option ruby_package = "Google::Cloud::SecurityCenterManagement::V1"; -option (google.api.resource_definition) = { - type: "securitycentermanagement.googleapis.com/OrganizationLocation" - pattern: "organizations/{organization}/locations/{location}" -}; -option (google.api.resource_definition) = { - type: "securitycentermanagement.googleapis.com/FolderLocation" - pattern: "folders/{folder}/locations/{location}" -}; - -// Service describing handlers for resources -service SecurityCenterManagement { - option (google.api.default_host) = "securitycentermanagement.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Returns a list of all - // [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] - // resources for the given parent. This includes resident modules defined at - // the scope of the parent, and inherited modules, inherited from ancestor - // organizations, folders, and projects (no descendants). - rpc ListEffectiveSecurityHealthAnalyticsCustomModules( - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) - returns (ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" - } - additional_bindings { - get: "/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single - // [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule]. - rpc GetEffectiveSecurityHealthAnalyticsCustomModule( - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) - returns (EffectiveSecurityHealthAnalyticsCustomModule) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" - } - additional_bindings { - get: "/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Returns a list of all - // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] - // resources for the given parent. This includes resident modules defined at - // the scope of the parent, and inherited modules, inherited from ancestor - // organizations, folders, and projects (no descendants). - rpc ListSecurityHealthAnalyticsCustomModules( - ListSecurityHealthAnalyticsCustomModulesRequest) - returns (ListSecurityHealthAnalyticsCustomModulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules" - } - additional_bindings { - get: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Returns a list of all resident - // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] - // resources under the given organization, folder, or project and all of its - // descendants. - rpc ListDescendantSecurityHealthAnalyticsCustomModules( - ListDescendantSecurityHealthAnalyticsCustomModulesRequest) - returns (ListDescendantSecurityHealthAnalyticsCustomModulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" - } - additional_bindings { - get: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Retrieves a - // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule]. - rpc GetSecurityHealthAnalyticsCustomModule( - GetSecurityHealthAnalyticsCustomModuleRequest) - returns (SecurityHealthAnalyticsCustomModule) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" - } - additional_bindings { - get: "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a resident - // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] - // at the scope of the given organization, folder, or project, and also - // creates inherited `SecurityHealthAnalyticsCustomModule` resources for all - // folders and projects that are descendants of the given parent. These - // modules are enabled by default. - rpc CreateSecurityHealthAnalyticsCustomModule( - CreateSecurityHealthAnalyticsCustomModuleRequest) - returns (SecurityHealthAnalyticsCustomModule) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules" - body: "security_health_analytics_custom_module" - additional_bindings { - post: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules" - body: "security_health_analytics_custom_module" - } - additional_bindings { - post: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules" - body: "security_health_analytics_custom_module" - } - }; - option (google.api.method_signature) = - "parent,security_health_analytics_custom_module"; - } - - // Updates the - // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] - // under the given name based on the given update mask. Updating the - // enablement state is supported on both resident and inherited modules - // (though resident modules cannot have an enablement state of "inherited"). - // Updating the display name and custom configuration of a module is supported - // on resident modules only. - rpc UpdateSecurityHealthAnalyticsCustomModule( - UpdateSecurityHealthAnalyticsCustomModuleRequest) - returns (SecurityHealthAnalyticsCustomModule) { - option (google.api.http) = { - patch: "/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}" - body: "security_health_analytics_custom_module" - additional_bindings { - patch: "/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" - body: "security_health_analytics_custom_module" - } - additional_bindings { - patch: "/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" - body: "security_health_analytics_custom_module" - } - }; - option (google.api.method_signature) = - "security_health_analytics_custom_module,update_mask"; - } - - // Deletes the specified - // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] - // and all of its descendants in the resource hierarchy. This method is only - // supported for resident custom modules. - rpc DeleteSecurityHealthAnalyticsCustomModule( - DeleteSecurityHealthAnalyticsCustomModuleRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}" - additional_bindings { - delete: "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" - } - additional_bindings { - delete: "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Simulates the result of using a - // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] - // to check a resource. - rpc SimulateSecurityHealthAnalyticsCustomModule( - SimulateSecurityHealthAnalyticsCustomModuleRequest) - returns (SimulateSecurityHealthAnalyticsCustomModuleResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate" - body: "*" - additional_bindings { - post: "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate" - body: "*" - } - additional_bindings { - post: "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate" - body: "*" - } - }; - option (google.api.method_signature) = "parent,custom_config,resource"; - } - - // Lists all effective Event Threat Detection custom modules for the - // given parent. This includes resident modules defined at the scope of the - // parent along with modules inherited from its ancestors. - rpc ListEffectiveEventThreatDetectionCustomModules( - ListEffectiveEventThreatDetectionCustomModulesRequest) - returns (ListEffectiveEventThreatDetectionCustomModulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModules" - } - additional_bindings { - get: "/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the effective Event Threat Detection custom module at the given level. - // - // The difference between an - // [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] - // and an - // [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] - // is that the fields for an `EffectiveEventThreatDetectionCustomModule` are - // computed from ancestors if needed. For example, the enablement state for an - // `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or - // `INHERITED`. In contrast, the enablement state for an - // `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` - // or `DISABLED`. - rpc GetEffectiveEventThreatDetectionCustomModule( - GetEffectiveEventThreatDetectionCustomModuleRequest) - returns (EffectiveEventThreatDetectionCustomModule) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" - } - additional_bindings { - get: "/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists all Event Threat Detection custom modules for the given organization, - // folder, or project. This includes resident modules defined at the scope of - // the parent along with modules inherited from ancestors. - rpc ListEventThreatDetectionCustomModules( - ListEventThreatDetectionCustomModulesRequest) - returns (ListEventThreatDetectionCustomModulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules" - } - additional_bindings { - get: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Lists all resident Event Threat Detection custom modules for the given - // organization, folder, or project and its descendants. - rpc ListDescendantEventThreatDetectionCustomModules( - ListDescendantEventThreatDetectionCustomModulesRequest) - returns (ListDescendantEventThreatDetectionCustomModulesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" - } - additional_bindings { - get: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Gets an Event Threat Detection custom module. - rpc GetEventThreatDetectionCustomModule( - GetEventThreatDetectionCustomModuleRequest) - returns (EventThreatDetectionCustomModule) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" - } - additional_bindings { - get: "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a resident Event Threat Detection custom module at the scope of the - // given organization, folder, or project, and creates inherited custom - // modules for all descendants of the given parent. These modules are enabled - // by default. - rpc CreateEventThreatDetectionCustomModule( - CreateEventThreatDetectionCustomModuleRequest) - returns (EventThreatDetectionCustomModule) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules" - body: "event_threat_detection_custom_module" - additional_bindings { - post: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules" - body: "event_threat_detection_custom_module" - } - additional_bindings { - post: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules" - body: "event_threat_detection_custom_module" - } - }; - option (google.api.method_signature) = - "parent,event_threat_detection_custom_module"; - } - - // Updates the Event Threat Detection custom module with the given name based - // on the given update mask. Updating the enablement state is supported for - // both resident and inherited modules (though resident modules cannot have an - // enablement state of "inherited"). Updating the display name or - // configuration of a module is supported for resident modules only. The type - // of a module cannot be changed. - rpc UpdateEventThreatDetectionCustomModule( - UpdateEventThreatDetectionCustomModuleRequest) - returns (EventThreatDetectionCustomModule) { - option (google.api.http) = { - patch: "/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}" - body: "event_threat_detection_custom_module" - additional_bindings { - patch: "/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" - body: "event_threat_detection_custom_module" - } - additional_bindings { - patch: "/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" - body: "event_threat_detection_custom_module" - } - }; - option (google.api.method_signature) = - "event_threat_detection_custom_module,update_mask"; - } - - // Deletes the specified Event Threat Detection custom module and all of its - // descendants in the resource hierarchy. This method is only supported for - // resident custom modules. - rpc DeleteEventThreatDetectionCustomModule( - DeleteEventThreatDetectionCustomModuleRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}" - additional_bindings { - delete: "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" - } - additional_bindings { - delete: "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Validates the given Event Threat Detection custom module. - rpc ValidateEventThreatDetectionCustomModule( - ValidateEventThreatDetectionCustomModuleRequest) - returns (ValidateEventThreatDetectionCustomModuleResponse) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate" - body: "*" - additional_bindings { - post: "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate" - body: "*" - } - additional_bindings { - post: "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate" - body: "*" - } - }; - } - - // Gets service settings for the specified Security Command Center service. - rpc GetSecurityCenterService(GetSecurityCenterServiceRequest) - returns (SecurityCenterService) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/securityCenterServices/*}" - additional_bindings { - get: "/v1/{name=folders/*/locations/*/securityCenterServices/*}" - } - additional_bindings { - get: "/v1/{name=organizations/*/locations/*/securityCenterServices/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Returns a list of all Security Command Center services for the given - // parent. - rpc ListSecurityCenterServices(ListSecurityCenterServicesRequest) - returns (ListSecurityCenterServicesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/securityCenterServices" - additional_bindings { - get: "/v1/{parent=folders/*/locations/*}/securityCenterServices" - } - additional_bindings { - get: "/v1/{parent=organizations/*/locations/*}/securityCenterServices" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a Security Command Center service using the given update mask. - rpc UpdateSecurityCenterService(UpdateSecurityCenterServiceRequest) - returns (SecurityCenterService) { - option (google.api.http) = { - patch: "/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}" - body: "security_center_service" - additional_bindings { - patch: "/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}" - body: "security_center_service" - } - additional_bindings { - patch: "/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}" - body: "security_center_service" - } - }; - option (google.api.method_signature) = - "security_center_service,update_mask"; - } -} - -// Represents a particular Security Command Center service. This includes -// settings information such as top-level enablement in addition to individual -// module settings. Service settings can be configured at the organization, -// folder, or project level. Service settings at the organization or folder -// level are inherited by those in descendant folders and projects. -message SecurityCenterService { - option (google.api.resource) = { - type: "securitycentermanagement.googleapis.com/SecurityCenterService" - pattern: "projects/{project}/locations/{location}/securityCenterServices/{service}" - pattern: "folders/{folder}/locations/{location}/securityCenterServices/{service}" - pattern: "organizations/{organization}/locations/{location}/securityCenterServices/{service}" - plural: "securityCenterServices" - singular: "securityCenterService" - }; - - // The settings for individual modules. - message ModuleSettings { - // Optional. The intended enablement state for the module at its level of - // the resource hierarchy. - EnablementState intended_enablement_state = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The effective enablement state for the module at its level - // of the resource hierarchy. If the intended state is set to `INHERITED`, - // the effective state will be inherited from the enablement state of an - // ancestor. This state may differ from the intended enablement state due to - // billing eligibility or onboarding status. - EnablementState effective_enablement_state = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Represents the possible enablement states for a service or module. - enum EnablementState { - // Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0; - - // State is inherited from the parent resource. Valid as an intended - // enablement state, but not as an effective enablement state. - INHERITED = 1; - - // State is enabled. - ENABLED = 2; - - // State is disabled. - DISABLED = 3; - - // Security Command Center is configured to ingest findings from this - // service, but not to enable this service. This state indicates that - // Security Command Center is misconfigured. You can't set this state - // yourself. - INGEST_ONLY = 4; - } - - // Identifier. The name of the service, in one of the following formats: - // - // * `organizations/{organization}/locations/{location}/securityCenterServices/{service}` - // * `folders/{folder}/locations/{location}/securityCenterServices/{service}` - // * `projects/{project}/locations/{location}/securityCenterServices/{service}` - // - // The following values are valid for `{service}`: - // - // * `container-threat-detection` - // * `event-threat-detection` - // * `security-health-analytics` - // * `vm-threat-detection` - // * `web-security-scanner` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The intended enablement state for the service at its level of the - // resource hierarchy. A `DISABLED` state will override all module enablement - // states to `DISABLED`. - EnablementState intended_enablement_state = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The effective enablement state for the service at its level of - // the resource hierarchy. If the intended state is set to `INHERITED`, the - // effective state will be inherited from the enablement state of an ancestor. - // This state may differ from the intended enablement state due to billing - // eligibility or onboarding status. - EnablementState effective_enablement_state = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The module configurations, including the enablement state for the - // service's modules. The absence of a module in the map implies that its - // configuration is inherited from its parents. - map modules = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time the service was last updated. This could be due to an - // explicit user update or due to a side effect of another system change, such - // as billing subscription expiry. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Additional service-specific configuration. Not all services will - // utilize this field. - google.protobuf.Struct service_config = 6 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The representation of a Security Health Analytics custom module at a -// specified level of the resource hierarchy: organization, folder, or project. -// If a custom module is inherited from an ancestor organization or folder, then -// the enablement state is set to the value that is effective in the parent, not -// to `INHERITED`. For example, if the module is enabled in an organization or -// folder, then the effective enablement state for the module is `ENABLED` in -// all descendant folders or projects. -message EffectiveSecurityHealthAnalyticsCustomModule { - option (google.api.resource) = { - type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" - pattern: "organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}" - pattern: "projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}" - pattern: "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}" - plural: "effectiveSecurityHealthAnalyticsCustomModules" - singular: "effectiveSecurityHealthAnalyticsCustomModule" - }; - - // The enablement state of the module. - enum EnablementState { - // Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0; - - // The module is enabled at the given level. - ENABLED = 1; - - // The module is disabled at the given level. - DISABLED = 2; - } - - // Identifier. The full resource name of the custom module, in one of the - // following formats: - // - // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. The user-specified configuration for the module. - CustomConfig custom_config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The effective enablement state for the module at the given - // level of the hierarchy. - EnablementState enablement_state = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The display name for the custom module. The name must be - // between 1 and 128 characters, start with a lowercase letter, and contain - // alphanumeric characters or underscores only. - string display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules]. -message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest { - // Required. Name of parent to list effective custom modules, in one of the - // following formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" - } - ]; - - // Optional. The maximum number of results to return in a single response. - // Default is 10, minimum is 1, maximum is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request. Provide this - // token to retrieve the next page of results. - // - // When paginating, the rest of the request must match the request that - // generated the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules]. -message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse { - // The list of effective Security Health Analytics custom modules. - repeated EffectiveSecurityHealthAnalyticsCustomModule - effective_security_health_analytics_custom_modules = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// Request message for -// [SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule]. -message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { - // Required. The full resource name of the custom module, specified in one of - // the following formats: - // - // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" - } - ]; -} - -// Represents an instance of a Security Health Analytics custom module, -// including its full module name, display name, enablement state, and last -// updated time. You can create a custom module at the organization, folder, or -// project level. Custom modules that you create at the organization or folder -// level are inherited by the descendant folders and projects. -message SecurityHealthAnalyticsCustomModule { - option (google.api.resource) = { - type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - pattern: "organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}" - pattern: "projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}" - pattern: "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}" - plural: "securityHealthAnalyticsCustomModules" - singular: "securityHealthAnalyticsCustomModule" - }; - - // Possible enablement states of a custom module. - enum EnablementState { - // Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0; - - // The module is enabled at the given organization, folder, or project. - ENABLED = 1; - - // The module is disabled at the given organization, folder, or project. - DISABLED = 2; - - // State is inherited from an ancestor module. The module will either - // be effectively `ENABLED` or `DISABLED` based on its closest non-inherited - // ancestor module in the resource hierarchy. If you try to set a top-level - // module (a module with no parent) to the `INHERITED` state, you receive an - // `INVALID_ARGUMENT` error. - INHERITED = 3; - } - - // Identifier. The full resource name of the custom module, in one of the - // following formats: - // - // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The display name of the Security Health Analytics custom module. - // This display name becomes the finding category for all findings that are - // returned by this custom module. The display name must be between 1 and 128 - // characters, start with a lowercase letter, and contain alphanumeric - // characters or underscores only. - string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The enablement state of the custom module. - EnablementState enablement_state = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time at which the custom module was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The editor that last updated the custom module. - string last_editor = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Specifies the organization or folder from which the custom - // module is inherited. If empty, indicates that the custom module was created - // in the organization, folder, or project in which you are viewing the custom - // module. - string ancestor_module = 6 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - ]; - - // Optional. The user-specified custom configuration for the module. - CustomConfig custom_config = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Defines the properties in a custom module configuration for Security -// Health Analytics. Use the custom module configuration to create custom -// detectors that generate custom findings for resources that you specify. -message CustomConfig { - // A set of optional name-value pairs that define custom source properties to - // return with each finding that is generated by the custom module. The custom - // source properties that are defined here are included in the finding. - message CustomOutputSpec { - // An individual name-value pair that defines a custom source property. - message Property { - // Optional. Name of the property for the custom output. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The CEL expression for the custom output. A resource property - // can be specified to return the value of the property or a text string - // enclosed in quotation marks. - google.type.Expr value_expression = 2 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. A list of custom output properties to add to the finding. - repeated Property properties = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Resource for selecting resource type. - message ResourceSelector { - // Optional. The resource types to run the detector on. - repeated string resource_types = 1 [(google.api.field_behavior) = OPTIONAL]; - } - - // Defines the valid value options for the severity of a finding. - enum Severity { - // Default value. This value is unused. - SEVERITY_UNSPECIFIED = 0; - - // Critical severity. - CRITICAL = 1; - - // High severity. - HIGH = 2; - - // Medium severity. - MEDIUM = 3; - - // Low severity. - LOW = 4; - } - - // Optional. The Common Expression Language (CEL) expression to evaluate to - // produce findings. When the expression evaluates to `true` against a - // resource, a finding is generated. - google.type.Expr predicate = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Custom output properties. - CustomOutputSpec custom_output = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Asset Inventory resource types that the custom module - // operates on. For information about resource types, see [Supported asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types). - // Each custom module can specify up to 5 resource types. - ResourceSelector resource_selector = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The severity to assign to findings generated by the module. - Severity severity = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Text that describes the vulnerability or misconfiguration that - // the custom module detects. This explanation is returned with each finding - // instance to help investigators understand the detected issue. The text must - // be enclosed in quotation marks. - string description = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An explanation of the recommended steps that security teams can - // take to resolve the detected issue. This explanation is returned with each - // finding generated by this module. - string recommendation = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules]. -message ListSecurityHealthAnalyticsCustomModulesRequest { - // Required. Name of the parent organization, folder, or project in which to - // list custom modules, in one of the following formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - ]; - - // Optional. The maximum number of results to return in a single response. - // Default is 10, minimum is 1, maximum is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request. Provide this - // token to retrieve the next page of results. - // - // When paginating, the rest of the request must match the request that - // generated the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules]. -message ListSecurityHealthAnalyticsCustomModulesResponse { - // The list of Security Health Analytics custom modules. - repeated SecurityHealthAnalyticsCustomModule - security_health_analytics_custom_modules = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// Request message for -// [SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules]. -message ListDescendantSecurityHealthAnalyticsCustomModulesRequest { - // Required. Name of the parent organization, folder, or project in which to - // list custom modules, in one of the following formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - ]; - - // Optional. The maximum number of results to return in a single response. - // Default is 10, minimum is 1, maximum is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request. Provide this - // token to retrieve the next page of results. - // - // When paginating, the rest of the request must match the request that - // generated the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules]. -message ListDescendantSecurityHealthAnalyticsCustomModulesResponse { - // The list of SecurityHealthAnalyticsCustomModules - repeated SecurityHealthAnalyticsCustomModule - security_health_analytics_custom_modules = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// Request message for -// [SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule]. -message GetSecurityHealthAnalyticsCustomModuleRequest { - // Required. Name of the resource, in the format - // `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - ]; -} - -// Request message for -// [SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule]. -message CreateSecurityHealthAnalyticsCustomModuleRequest { - // Required. Name of the parent organization, folder, or project of the - // module, in one of the following formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - ]; - - // Required. The resource being created. - SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = - 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. When set to `true`, the request will be validated (including IAM - // checks), but no module will be created. An `OK` response indicates that the - // request is valid, while an error response indicates that the request is - // invalid. - // - // If the request is valid, a subsequent request to create the module could - // still fail for one of the following reasons: - // - // * The state of your cloud resources changed; for example, you lost a - // required IAM permission - // * An error occurred during creation of the module - // - // Defaults to `false`. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule]. -message UpdateSecurityHealthAnalyticsCustomModuleRequest { - // Required. The fields to update. The following values are valid: - // - // * `custom_config` - // * `enablement_state` - // - // If you omit this field or set it to the wildcard value `*`, then all - // eligible fields are updated. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource being updated. - SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = - 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. When set to `true`, the request will be validated (including IAM - // checks), but no module will be updated. An `OK` response indicates that the - // request is valid, while an error response indicates that the request is - // invalid. - // - // If the request is valid, a subsequent request to update the module could - // still fail for one of the following reasons: - // - // * The state of your cloud resources changed; for example, you lost a - // required IAM permission - // * An error occurred during creation of the module - // - // Defaults to `false`. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule]. -message DeleteSecurityHealthAnalyticsCustomModuleRequest { - // Required. The resource name of the SHA custom module, in one of the - // following formats: - // - // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - ]; - - // Optional. When set to `true`, the request will be validated (including IAM - // checks), but no module will be deleted. An `OK` response indicates that the - // request is valid, while an error response indicates that the request is - // invalid. - // - // If the request is valid, a subsequent request to delete the module could - // still fail for one of the following reasons: - // - // * The state of your cloud resources changed; for example, you lost a - // required IAM permission - // * An error occurred during deletion of the module - // - // Defaults to `false`. - bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule]. -// The maximum size of the request is 4 MiB. -message SimulateSecurityHealthAnalyticsCustomModuleRequest { - // Manually constructed information about a resource. - message SimulatedResource { - // Required. The type of the resource. For example, - // `compute.googleapis.com/Disk`. - string resource_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A representation of the Google Cloud resource. Should match the - // Google Cloud resource JSON format. - // - // If the custom module evaluates only the IAM allow policy, then you can - // omit this field. - google.protobuf.Struct resource_data = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A representation of the IAM allow policy. - // - // If the custom module evaluates only the resource data, then you can omit - // this field. - google.iam.v1.Policy iam_policy_data = 3 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. The relative resource name of the organization, project, or - // folder. For more information about relative resource names, see [AIP-122: - // Resource names](https://google.aip.dev/122). Example: - // `organizations/{organization_id}`. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The custom configuration that you need to test. - CustomConfig custom_config = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Resource data to simulate custom module against. - SimulatedResource resource = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The minimum set of fields needed to represent a simulated finding from a -// Security Health Analytics custom module. -message SimulatedFinding { - option (google.api.resource) = { - type: "securitycenter.googleapis.com/Finding" - pattern: "organizations/{organization}/sources/{source}/findings/{finding}" - pattern: "folders/{folder}/sources/{source}/findings/{finding}" - pattern: "projects/{project}/sources/{source}/findings/{finding}" - plural: "findings" - singular: "finding" - }; - - // The state of the finding. - enum State { - // Default value. This value is unused. - STATE_UNSPECIFIED = 0; - - // The finding requires attention and has not been addressed yet. - ACTIVE = 1; - - // The finding has been fixed, triaged as a non-issue, or otherwise - // addressed and is no longer active. - INACTIVE = 2; - } - - // The severity of the finding. - enum Severity { - // Default value. This value is unused. - SEVERITY_UNSPECIFIED = 0; - - // For vulnerabilities: A critical vulnerability is easily discoverable by - // an external actor, exploitable, and results in the direct ability to - // execute arbitrary code, exfiltrate data, and otherwise gain additional - // access and privileges to cloud resources and workloads. Examples include - // publicly accessible unprotected user data and public SSH access with weak - // or no passwords. - // - // For threats: Indicates a threat that is able to access, modify, or delete - // data or execute unauthorized code within existing resources. - CRITICAL = 1; - - // For vulnerabilities: A high-risk vulnerability can be easily discovered - // and exploited in combination with other vulnerabilities in order to gain - // direct access and the ability to execute arbitrary code, exfiltrate data, - // and otherwise gain additional access and privileges to cloud resources - // and workloads. An example is a database with weak or no passwords that is - // only accessible internally. This database could easily be compromised by - // an actor that had access to the internal network. - // - // For threats: Indicates a threat that is able to create new computational - // resources in an environment but not able to access data or execute code - // in existing resources. - HIGH = 2; - - // For vulnerabilities: A medium-risk vulnerability could be used by an - // actor to gain access to resources or privileges that enable them to - // eventually (through multiple steps or a complex exploit) gain access and - // the ability to execute arbitrary code or exfiltrate data. An example is a - // service account with access to more projects than it should have. If an - // actor gains access to the service account, they could potentially use - // that access to manipulate a project the service account was not intended - // to. - // - // For threats: Indicates a threat that is able to cause operational impact - // but may not access data or execute unauthorized code. - MEDIUM = 3; - - // For vulnerabilities: A low-risk vulnerability hampers a security - // organization's ability to detect vulnerabilities or active threats in - // their deployment, or prevents the root cause investigation of security - // issues. An example is monitoring and logs being disabled for resource - // configurations and access. - // - // For threats: Indicates a threat that has obtained minimal access to an - // environment but is not able to access data, execute code, or create - // resources. - LOW = 4; - } - - // Represents what kind of finding it is. - enum FindingClass { - // Default value. This value is unused. - FINDING_CLASS_UNSPECIFIED = 0; - - // Describes unwanted or malicious activity. - THREAT = 1; - - // Describes a potential weakness in software that increases risk to - // confidentiality, integrity, and availability. - VULNERABILITY = 2; - - // Describes a potential weakness in cloud resource or asset configuration - // that increases risk. - MISCONFIGURATION = 3; - - // Describes a security observation that is for informational purposes. - OBSERVATION = 4; - - // Describes an error that prevents Security Command Center from working - // correctly. - SCC_ERROR = 5; - - // Describes a potential security risk due to a change in the security - // posture. - POSTURE_VIOLATION = 6; - - // Describes a combination of security issues that represent a more severe - // security problem when taken together. - TOXIC_COMBINATION = 7; - } - - // Identifier. The [relative resource name](https://google.aip.dev/122) of the - // finding, in one of the following formats: - // - // * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` - // * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` - // * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // The [relative resource name](https://google.aip.dev/122) of the source the - // finding belongs to. For example, - // `organizations/{organization_id}/sources/{source_id}`. This field is - // immutable after creation time. - string parent = 2; - - // For findings on Google Cloud resources, the - // [full resource name](https://google.aip.dev/122#full-resource-names) of the - // Google Cloud resource this finding is for. When the finding is for a - // non-Google Cloud resource, the value can be a customer or partner defined - // string. This field is immutable after creation time. - string resource_name = 3; - - // The additional taxonomy group within findings from a given source. For - // example, `XSS_FLASH_INJECTION`. This field is immutable after creation - // time. - string category = 4; - - // Output only. The state of the finding. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Source-specific properties. These properties are managed by the source - // that writes the finding. The key names must be between 1 and 255 - // characters; they must start with a letter and contain alphanumeric - // characters or underscores only. - map source_properties = 6; - - // The time the finding was first detected. If an existing finding is updated, - // then this is the time the update occurred. If the finding is later - // resolved, then this time reflects when the finding was resolved. - // - // For example, if the finding represents an open firewall, this property - // captures the time the detector believes the firewall became open. The - // accuracy is determined by the detector. - // - // The event time must not be set to a value greater than the current - // timestamp. - google.protobuf.Timestamp event_time = 7; - - // The severity of the finding. This field is managed by the source that - // writes the finding. - Severity severity = 8; - - // The class of the finding. - FindingClass finding_class = 9; -} - -// Response message for -// [SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule]. -message SimulateSecurityHealthAnalyticsCustomModuleResponse { - // Possible test result. - message SimulatedResult { - // The result of the simulation. - oneof result { - // Finding that would be published for the test case if a violation is - // detected. - SimulatedFinding finding = 1; - - // Indicates that the test case does not trigger any violation. - google.protobuf.Empty no_violation = 2; - - // Error encountered during the test. - google.rpc.Status error = 3; - } - } - - // Result for test case in the corresponding request. - SimulatedResult result = 1; -} - -// The representation of an -// [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] -// at a given level, taking hierarchy into account and resolving various fields -// accordingly. For example, if the module is enabled at the ancestor level, -// then effective modules at all descendant levels will have their enablement -// state set to `ENABLED`. Similarly, if `module.inherited` is set, then the -// effective module's configuration will reflect the ancestor's configuration. -message EffectiveEventThreatDetectionCustomModule { - option (google.api.resource) = { - type: "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" - pattern: "organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}" - pattern: "projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}" - pattern: "folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}" - plural: "effectiveEventThreatDetectionCustomModules" - singular: "effectiveEventThreatDetectionCustomModule" - }; - - // The enablement state of the module. - enum EnablementState { - // Default value. This value is unused. - ENABLEMENT_STATE_UNSPECIFIED = 0; - - // The module is enabled at the given level. - ENABLED = 1; - - // The module is disabled at the given level. - DISABLED = 2; - } - - // Identifier. The resource name of the Event Threat Detection custom module, - // in one of the following formats: - // - // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Output only. Configuration for the effective module. - google.protobuf.Struct config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The effective state of enablement for the module at the given - // level of the hierarchy. - EnablementState enablement_state = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Type for the module (for example, `CONFIGURABLE_BAD_IP`). - string type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The human-readable name of the module. - string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. A description of the module. - string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules]. -message ListEffectiveEventThreatDetectionCustomModulesRequest { - // Required. Name of parent to list effective custom modules, in one of the - // following formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" - } - ]; - - // Optional. The maximum number of results to return in a single response. - // Default is 10, minimum is 1, maximum is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request. Provide this - // token to retrieve the next page of results. - // - // When paginating, the rest of the request must match the request that - // generated the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules]. -message ListEffectiveEventThreatDetectionCustomModulesResponse { - // The list of effective Event Threat Detection custom modules. - repeated EffectiveEventThreatDetectionCustomModule - effective_event_threat_detection_custom_modules = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// Request message for -// [SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule]. -message GetEffectiveEventThreatDetectionCustomModuleRequest { - // Required. The resource name of the Event Threat Detection custom module, in - // one of the following formats: - // - // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" - } - ]; -} - -// A Security Command Center resource that contains the configuration and -// enablement state of a custom module, which enables Event Threat Detection to -// write certain findings to Security Command Center. -message EventThreatDetectionCustomModule { - option (google.api.resource) = { - type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - pattern: "organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}" - pattern: "projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}" - pattern: "folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}" - plural: "eventThreatDetectionCustomModules" - singular: "eventThreatDetectionCustomModule" - }; - - // The enablement state of the module. - enum EnablementState { - // Unspecified enablement state. - ENABLEMENT_STATE_UNSPECIFIED = 0; - - // The module is enabled at the given level. - ENABLED = 1; - - // The module is disabled at the given level. - DISABLED = 2; - - // State is inherited from an ancestor module. The module will either be - // effectively `ENABLED` or `DISABLED` based on its closest non-inherited - // ancestor module in the CRM hierarchy. If you try to set a top-level - // module (a module with no parent) to the `INHERITED` state, you receive an - // `INVALID_ARGUMENT` error. - INHERITED = 3; - } - - // Identifier. The resource name of the Event Threat Detection custom module, - // in one of the following formats: - // - // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. Configuration for the module. For the resident module, its - // configuration value is defined at this level. For the inherited module, its - // configuration value is inherited from the ancestor module. - google.protobuf.Struct config = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The closest ancestor module that this module inherits the - // enablement state from. If empty, indicates that the custom module was - // created in the requesting parent organization, folder, or project. The - // format is the same as the custom module's resource name. - string ancestor_module = 3 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - ]; - - // Optional. The state of enablement for the module at the given level of the - // hierarchy. - EnablementState enablement_state = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Type for the module. For example, `CONFIGURABLE_BAD_IP`. - string type = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The human-readable name of the module. - string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A description of the module. - string description = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time the module was last updated. - google.protobuf.Timestamp update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The editor the module was last updated by. - string last_editor = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [SecurityCenterManagement.ListEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules]. -message ListEventThreatDetectionCustomModulesRequest { - // Required. Name of parent to list custom modules, in one of the following - // formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - ]; - - // Optional. The maximum number of modules to return. The service may return - // fewer than this value. If unspecified, at most 10 modules will be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request. Provide this - // token to retrieve the next page of results. - // - // When paginating, the rest of the request must match the request that - // generated the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [SecurityCenterManagement.ListEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules]. -message ListEventThreatDetectionCustomModulesResponse { - // The list of custom modules. - repeated EventThreatDetectionCustomModule - event_threat_detection_custom_modules = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// Request message for -// [SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules]. -message ListDescendantEventThreatDetectionCustomModulesRequest { - // Required. Name of parent to list custom modules, in one of the following - // formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - ]; - - // Optional. The maximum number of modules to return. The service may return - // fewer than this value. If unspecified, at most 10 configs will be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request. Provide this - // token to retrieve the next page of results. - // - // When paginating, the rest of the request must match the request that - // generated the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules]. -message ListDescendantEventThreatDetectionCustomModulesResponse { - // The list of custom modules. - repeated EventThreatDetectionCustomModule - event_threat_detection_custom_modules = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// Request message for -// [SecurityCenterManagement.GetEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule]. -message GetEventThreatDetectionCustomModuleRequest { - // Required. The resource name of the Event Threat Detection custom module, in - // one of the following formats: - // - // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - ]; -} - -// Request message for -// [SecurityCenterManagement.CreateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule]. -message CreateEventThreatDetectionCustomModuleRequest { - // Required. Name of parent for the module, in one of the following formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - ]; - - // Required. The module to create. The - // [EventThreatDetectionCustomModule.name][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name] - // field is ignored; Security Command Center generates the name. - EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. When set to `true`, the request will be validated (including IAM - // checks), but no module will be created. An `OK` response indicates that the - // request is valid, while an error response indicates that the request is - // invalid. - // - // If the request is valid, a subsequent request to create the module could - // still fail for one of the following reasons: - // - // * The state of your cloud resources changed; for example, you lost a - // required IAM permission - // * An error occurred during creation of the module - // - // Defaults to `false`. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Message for updating a EventThreatDetectionCustomModule -message UpdateEventThreatDetectionCustomModuleRequest { - // Required. The fields to update. If omitted, then all fields are updated. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The module being updated. - EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. When set to `true`, the request will be validated (including IAM - // checks), but no module will be updated. An `OK` response indicates that the - // request is valid, while an error response indicates that the request is - // invalid. - // - // If the request is valid, a subsequent request to update the module could - // still fail for one of the following reasons: - // - // * The state of your cloud resources changed; for example, you lost a - // required IAM permission - // * An error occurred during creation of the module - // - // Defaults to `false`. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [SecurityCenterManagement.DeleteEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule]. -message DeleteEventThreatDetectionCustomModuleRequest { - // Required. The resource name of the Event Threat Detection custom module, in - // one of the following formats: - // - // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - ]; - - // Optional. When set to `true`, the request will be validated (including IAM - // checks), but no module will be deleted. An `OK` response indicates that the - // request is valid, while an error response indicates that the request is - // invalid. - // - // If the request is valid, a subsequent request to delete the module could - // still fail for one of the following reasons: - // - // * The state of your cloud resources changed; for example, you lost a - // required IAM permission - // * An error occurred during creation of the module - // - // Defaults to `false`. - bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [SecurityCenterManagement.ValidateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule]. -message ValidateEventThreatDetectionCustomModuleRequest { - // Required. Resource name of the parent to validate the custom modules under, - // in one of the following formats: - // - // * `organizations/{organization}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - ]; - - // Required. The raw text of the module's contents. Used to generate error - // messages. - string raw_text = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. - string type = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [SecurityCenterManagement.ValidateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule]. -message ValidateEventThreatDetectionCustomModuleResponse { - // An error encountered while validating the uploaded configuration of an - // Event Threat Detection custom module. - message CustomModuleValidationError { - // A human-readable description of the error. - string description = 1; - - // The path, in [RFC 6901: JSON - // Pointer](https://datatracker.ietf.org/doc/html/rfc6901) format, to the - // field that failed validation. Omitted if no specific field is affected. - string field_path = 2; - - // The initial position of the error in the uploaded text version of the - // module. Omitted if no specific position applies, or if the position could - // not be computed. - optional Position start = 3; - - // The end position of the error in the uploaded text version of the module. - // Omitted if no specific position applies, or if the position could not be - // computed. - optional Position end = 4; - } - - // A position in the uploaded text version of a module. - message Position { - // The line position in the text. - int32 line_number = 1; - - // The column position in the line. - int32 column_number = 2; - } - - // A list of errors returned by the validator. If the list is empty, there - // were no errors. - repeated CustomModuleValidationError errors = 2; -} - -// Request message for -// [SecurityCenterManagement.GetSecurityCenterService][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService]. -message GetSecurityCenterServiceRequest { - // Required. The Security Command Center service to retrieve, in one of the - // following formats: - // - // * organizations/{organization}/locations/{location}/securityCenterServices/{service} - // * folders/{folder}/locations/{location}/securityCenterServices/{service} - // * projects/{project}/locations/{location}/securityCenterServices/{service} - // - // The following values are valid for `{service}`: - // - // * `container-threat-detection` - // * `event-threat-detection` - // * `security-health-analytics` - // * `vm-threat-detection` - // * `web-security-scanner` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "securitycentermanagement.googleapis.com/SecurityCenterService" - } - ]; - - // Set to `true` to show only modules that are in scope. By default, all - // modules are shown. - bool show_eligible_modules_only = 2; -} - -// Request message for -// [SecurityCenterManagement.ListSecurityCenterServices][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices]. -message ListSecurityCenterServicesRequest { - // Required. The name of the parent to list Security Command Center services, - // in one of the following formats: - // - // * `organizations/{organization}/locations/{location}` - // * `folders/{folder}/locations/{location}` - // * `projects/{project}/locations/{location}` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "securitycentermanagement.googleapis.com/SecurityCenterService" - } - ]; - - // Optional. The maximum number of results to return in a single response. - // Default is 10, minimum is 1, maximum is 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous request. Provide this - // token to retrieve the next page of results. - // - // When paginating, the rest of the request must match the request that - // generated the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Flag that, when set, is used to filter the module settings that are shown. - // The default setting is that all modules are shown. - bool show_eligible_modules_only = 4; -} - -// Response message for -// [SecurityCenterManagement.ListSecurityCenterServices][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices]. -message ListSecurityCenterServicesResponse { - // The list of services. - repeated SecurityCenterService security_center_services = 1; - - // A pagination token. To retrieve the next page of results, call the method - // again with this token. - string next_page_token = 2; -} - -// Request message for -// [SecurityCenterManagement.UpdateSecurityCenterService][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService]. -message UpdateSecurityCenterServiceRequest { - // Required. The updated service. - SecurityCenterService security_center_service = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The fields to update. Accepts the following values: - // - // * `intended_enablement_state` - // * `modules` - // - // If omitted, then all eligible fields are updated. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. When set to `true`, the request will be validated (including IAM - // checks), but no service will be updated. An `OK` response indicates that - // the request is valid, while an error response indicates that the request is - // invalid. - // - // If the request is valid, a subsequent request to update the service could - // still fail for one of the following reasons: - // - // * The state of your cloud resources changed; for example, you lost a - // required IAM permission - // * An error occurred during update of the service - // - // Defaults to `false`. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts deleted file mode 100644 index a03ba381397..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.d.ts +++ /dev/null @@ -1,13604 +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 securitycentermanagement. */ - namespace securitycentermanagement { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a SecurityCenterManagement */ - class SecurityCenterManagement extends $protobuf.rpc.Service { - - /** - * Constructs a new SecurityCenterManagement 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 SecurityCenterManagement 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): SecurityCenterManagement; - - /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - */ - public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback): void; - - /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @param request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns Promise - */ - public listEffectiveSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): Promise; - - /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule - */ - public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback): void; - - /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @param request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise - */ - public getEffectiveSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): Promise; - - /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse - */ - public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModulesCallback): void; - - /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @param request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns Promise - */ - public listSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest): Promise; - - /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse - */ - public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModulesCallback): void; - - /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @param request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns Promise - */ - public listDescendantSecurityHealthAnalyticsCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): Promise; - - /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - */ - public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModuleCallback): void; - - /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @param request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise - */ - public getSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): Promise; - - /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - */ - public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModuleCallback): void; - - /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @param request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise - */ - public createSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): Promise; - - /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - */ - public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModuleCallback): void; - - /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @param request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise - */ - public updateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): Promise; - - /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModuleCallback): void; - - /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @param request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise - */ - public deleteSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): Promise; - - /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse - */ - public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModuleCallback): void; - - /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @param request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns Promise - */ - public simulateSecurityHealthAnalyticsCustomModule(request: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): Promise; - - /** - * Calls ListEffectiveEventThreatDetectionCustomModules. - * @param request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEffectiveEventThreatDetectionCustomModulesResponse - */ - public listEffectiveEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModulesCallback): void; - - /** - * Calls ListEffectiveEventThreatDetectionCustomModules. - * @param request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object - * @returns Promise - */ - public listEffectiveEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest): Promise; - - /** - * Calls GetEffectiveEventThreatDetectionCustomModule. - * @param request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EffectiveEventThreatDetectionCustomModule - */ - public getEffectiveEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModuleCallback): void; - - /** - * Calls GetEffectiveEventThreatDetectionCustomModule. - * @param request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object - * @returns Promise - */ - public getEffectiveEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest): Promise; - - /** - * Calls ListEventThreatDetectionCustomModules. - * @param request ListEventThreatDetectionCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEventThreatDetectionCustomModulesResponse - */ - public listEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModulesCallback): void; - - /** - * Calls ListEventThreatDetectionCustomModules. - * @param request ListEventThreatDetectionCustomModulesRequest message or plain object - * @returns Promise - */ - public listEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest): Promise; - - /** - * Calls ListDescendantEventThreatDetectionCustomModules. - * @param request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDescendantEventThreatDetectionCustomModulesResponse - */ - public listDescendantEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModulesCallback): void; - - /** - * Calls ListDescendantEventThreatDetectionCustomModules. - * @param request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object - * @returns Promise - */ - public listDescendantEventThreatDetectionCustomModules(request: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest): Promise; - - /** - * Calls GetEventThreatDetectionCustomModule. - * @param request GetEventThreatDetectionCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule - */ - public getEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModuleCallback): void; - - /** - * Calls GetEventThreatDetectionCustomModule. - * @param request GetEventThreatDetectionCustomModuleRequest message or plain object - * @returns Promise - */ - public getEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest): Promise; - - /** - * Calls CreateEventThreatDetectionCustomModule. - * @param request CreateEventThreatDetectionCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule - */ - public createEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModuleCallback): void; - - /** - * Calls CreateEventThreatDetectionCustomModule. - * @param request CreateEventThreatDetectionCustomModuleRequest message or plain object - * @returns Promise - */ - public createEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest): Promise; - - /** - * Calls UpdateEventThreatDetectionCustomModule. - * @param request UpdateEventThreatDetectionCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule - */ - public updateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModuleCallback): void; - - /** - * Calls UpdateEventThreatDetectionCustomModule. - * @param request UpdateEventThreatDetectionCustomModuleRequest message or plain object - * @returns Promise - */ - public updateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest): Promise; - - /** - * Calls DeleteEventThreatDetectionCustomModule. - * @param request DeleteEventThreatDetectionCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModuleCallback): void; - - /** - * Calls DeleteEventThreatDetectionCustomModule. - * @param request DeleteEventThreatDetectionCustomModuleRequest message or plain object - * @returns Promise - */ - public deleteEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest): Promise; - - /** - * Calls ValidateEventThreatDetectionCustomModule. - * @param request ValidateEventThreatDetectionCustomModuleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ValidateEventThreatDetectionCustomModuleResponse - */ - public validateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModuleCallback): void; - - /** - * Calls ValidateEventThreatDetectionCustomModule. - * @param request ValidateEventThreatDetectionCustomModuleRequest message or plain object - * @returns Promise - */ - public validateEventThreatDetectionCustomModule(request: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest): Promise; - - /** - * Calls GetSecurityCenterService. - * @param request GetSecurityCenterServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityCenterService - */ - public getSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterServiceCallback): void; - - /** - * Calls GetSecurityCenterService. - * @param request GetSecurityCenterServiceRequest message or plain object - * @returns Promise - */ - public getSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest): Promise; - - /** - * Calls ListSecurityCenterServices. - * @param request ListSecurityCenterServicesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSecurityCenterServicesResponse - */ - public listSecurityCenterServices(request: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServicesCallback): void; - - /** - * Calls ListSecurityCenterServices. - * @param request ListSecurityCenterServicesRequest message or plain object - * @returns Promise - */ - public listSecurityCenterServices(request: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest): Promise; - - /** - * Calls UpdateSecurityCenterService. - * @param request UpdateSecurityCenterServiceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SecurityCenterService - */ - public updateSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, callback: google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterServiceCallback): void; - - /** - * Calls UpdateSecurityCenterService. - * @param request UpdateSecurityCenterServiceRequest message or plain object - * @returns Promise - */ - public updateSecurityCenterService(request: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest): Promise; - } - - namespace SecurityCenterManagement { - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveSecurityHealthAnalyticsCustomModules}. - * @param error Error, if any - * @param [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - */ - type ListEffectiveSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] EffectiveSecurityHealthAnalyticsCustomModule - */ - type GetEffectiveSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityHealthAnalyticsCustomModules}. - * @param error Error, if any - * @param [response] ListSecurityHealthAnalyticsCustomModulesResponse - */ - type ListSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantSecurityHealthAnalyticsCustomModules}. - * @param error Error, if any - * @param [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse - */ - type ListDescendantSecurityHealthAnalyticsCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SecurityHealthAnalyticsCustomModule - */ - type GetSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SecurityHealthAnalyticsCustomModule - */ - type CreateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SecurityHealthAnalyticsCustomModule - */ - type UpdateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|simulateSecurityHealthAnalyticsCustomModule}. - * @param error Error, if any - * @param [response] SimulateSecurityHealthAnalyticsCustomModuleResponse - */ - type SimulateSecurityHealthAnalyticsCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveEventThreatDetectionCustomModules}. - * @param error Error, if any - * @param [response] ListEffectiveEventThreatDetectionCustomModulesResponse - */ - type ListEffectiveEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveEventThreatDetectionCustomModule}. - * @param error Error, if any - * @param [response] EffectiveEventThreatDetectionCustomModule - */ - type GetEffectiveEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEventThreatDetectionCustomModules}. - * @param error Error, if any - * @param [response] ListEventThreatDetectionCustomModulesResponse - */ - type ListEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantEventThreatDetectionCustomModules}. - * @param error Error, if any - * @param [response] ListDescendantEventThreatDetectionCustomModulesResponse - */ - type ListDescendantEventThreatDetectionCustomModulesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEventThreatDetectionCustomModule}. - * @param error Error, if any - * @param [response] EventThreatDetectionCustomModule - */ - type GetEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createEventThreatDetectionCustomModule}. - * @param error Error, if any - * @param [response] EventThreatDetectionCustomModule - */ - type CreateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateEventThreatDetectionCustomModule}. - * @param error Error, if any - * @param [response] EventThreatDetectionCustomModule - */ - type UpdateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteEventThreatDetectionCustomModule}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|validateEventThreatDetectionCustomModule}. - * @param error Error, if any - * @param [response] ValidateEventThreatDetectionCustomModuleResponse - */ - type ValidateEventThreatDetectionCustomModuleCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityCenterService}. - * @param error Error, if any - * @param [response] SecurityCenterService - */ - type GetSecurityCenterServiceCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityCenterService) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityCenterServices}. - * @param error Error, if any - * @param [response] ListSecurityCenterServicesResponse - */ - type ListSecurityCenterServicesCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse) => void; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityCenterService}. - * @param error Error, if any - * @param [response] SecurityCenterService - */ - type UpdateSecurityCenterServiceCallback = (error: (Error|null), response?: google.cloud.securitycentermanagement.v1.SecurityCenterService) => void; - } - - /** Properties of a SecurityCenterService. */ - interface ISecurityCenterService { - - /** SecurityCenterService name */ - name?: (string|null); - - /** SecurityCenterService intendedEnablementState */ - intendedEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); - - /** SecurityCenterService effectiveEnablementState */ - effectiveEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); - - /** SecurityCenterService modules */ - modules?: ({ [k: string]: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings }|null); - - /** SecurityCenterService updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** SecurityCenterService serviceConfig */ - serviceConfig?: (google.protobuf.IStruct|null); - } - - /** Represents a SecurityCenterService. */ - class SecurityCenterService implements ISecurityCenterService { - - /** - * Constructs a new SecurityCenterService. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ISecurityCenterService); - - /** SecurityCenterService name. */ - public name: string; - - /** SecurityCenterService intendedEnablementState. */ - public intendedEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); - - /** SecurityCenterService effectiveEnablementState. */ - public effectiveEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); - - /** SecurityCenterService modules. */ - public modules: { [k: string]: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings }; - - /** SecurityCenterService updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** SecurityCenterService serviceConfig. */ - public serviceConfig?: (google.protobuf.IStruct|null); - - /** - * Creates a new SecurityCenterService instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityCenterService instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ISecurityCenterService): google.cloud.securitycentermanagement.v1.SecurityCenterService; - - /** - * Encodes the specified SecurityCenterService message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. - * @param message SecurityCenterService message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ISecurityCenterService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityCenterService message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. - * @param message SecurityCenterService message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISecurityCenterService, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityCenterService message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityCenterService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SecurityCenterService; - - /** - * Decodes a SecurityCenterService message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityCenterService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SecurityCenterService; - - /** - * Verifies a SecurityCenterService message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityCenterService message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityCenterService - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SecurityCenterService; - - /** - * Creates a plain object from a SecurityCenterService message. Also converts values to other types if specified. - * @param message SecurityCenterService - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SecurityCenterService, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityCenterService to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecurityCenterService - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecurityCenterService { - - /** Properties of a ModuleSettings. */ - interface IModuleSettings { - - /** ModuleSettings intendedEnablementState */ - intendedEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); - - /** ModuleSettings effectiveEnablementState */ - effectiveEnablementState?: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null); - } - - /** Represents a ModuleSettings. */ - class ModuleSettings implements IModuleSettings { - - /** - * Constructs a new ModuleSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings); - - /** ModuleSettings intendedEnablementState. */ - public intendedEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); - - /** ModuleSettings effectiveEnablementState. */ - public effectiveEnablementState: (google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState); - - /** - * Creates a new ModuleSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ModuleSettings instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; - - /** - * Encodes the specified ModuleSettings message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. - * @param message ModuleSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModuleSettings message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. - * @param message ModuleSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModuleSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModuleSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; - - /** - * Decodes a ModuleSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModuleSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; - - /** - * Verifies a ModuleSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModuleSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModuleSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings; - - /** - * Creates a plain object from a ModuleSettings message. Also converts values to other types if specified. - * @param message ModuleSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModuleSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModuleSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - INHERITED = 1, - ENABLED = 2, - DISABLED = 3, - INGEST_ONLY = 4 - } - } - - /** Properties of an EffectiveSecurityHealthAnalyticsCustomModule. */ - interface IEffectiveSecurityHealthAnalyticsCustomModule { - - /** EffectiveSecurityHealthAnalyticsCustomModule name */ - name?: (string|null); - - /** EffectiveSecurityHealthAnalyticsCustomModule customConfig */ - customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); - - /** EffectiveSecurityHealthAnalyticsCustomModule enablementState */ - enablementState?: (google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null); - - /** EffectiveSecurityHealthAnalyticsCustomModule displayName */ - displayName?: (string|null); - } - - /** Represents an EffectiveSecurityHealthAnalyticsCustomModule. */ - class EffectiveSecurityHealthAnalyticsCustomModule implements IEffectiveSecurityHealthAnalyticsCustomModule { - - /** - * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule); - - /** EffectiveSecurityHealthAnalyticsCustomModule name. */ - public name: string; - - /** EffectiveSecurityHealthAnalyticsCustomModule customConfig. */ - public customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); - - /** EffectiveSecurityHealthAnalyticsCustomModule enablementState. */ - public enablementState: (google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState); - - /** EffectiveSecurityHealthAnalyticsCustomModule displayName. */ - public displayName: string; - - /** - * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. - * @param [properties] Properties to set - * @returns EffectiveSecurityHealthAnalyticsCustomModule instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; - - /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EffectiveSecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; - - /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EffectiveSecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; - - /** - * Verifies an EffectiveSecurityHealthAnalyticsCustomModule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EffectiveSecurityHealthAnalyticsCustomModule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule; - - /** - * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. - * @param message EffectiveSecurityHealthAnalyticsCustomModule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EffectiveSecurityHealthAnalyticsCustomModule { - - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2 - } - } - - /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ - interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent */ - parent?: (string|null); - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize */ - pageSize?: (number|null); - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. */ - class ListEffectiveSecurityHealthAnalyticsCustomModulesRequest implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest { - - /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest); - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. */ - public parent: string; - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. */ - public pageSize: number; - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ - interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules */ - effectiveSecurityHealthAnalyticsCustomModules?: (google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]|null); - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. */ - class ListEffectiveSecurityHealthAnalyticsCustomModulesResponse implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse { - - /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse); - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. */ - public effectiveSecurityHealthAnalyticsCustomModules: google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]; - - /** ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ - interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { - - /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name */ - name?: (string|null); - } - - /** Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. */ - class GetEffectiveSecurityHealthAnalyticsCustomModuleRequest implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest { - - /** - * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest); - - /** GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. */ - public name: string; - - /** - * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SecurityHealthAnalyticsCustomModule. */ - interface ISecurityHealthAnalyticsCustomModule { - - /** SecurityHealthAnalyticsCustomModule name */ - name?: (string|null); - - /** SecurityHealthAnalyticsCustomModule displayName */ - displayName?: (string|null); - - /** SecurityHealthAnalyticsCustomModule enablementState */ - enablementState?: (google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null); - - /** SecurityHealthAnalyticsCustomModule updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** SecurityHealthAnalyticsCustomModule lastEditor */ - lastEditor?: (string|null); - - /** SecurityHealthAnalyticsCustomModule ancestorModule */ - ancestorModule?: (string|null); - - /** SecurityHealthAnalyticsCustomModule customConfig */ - customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); - } - - /** Represents a SecurityHealthAnalyticsCustomModule. */ - class SecurityHealthAnalyticsCustomModule implements ISecurityHealthAnalyticsCustomModule { - - /** - * Constructs a new SecurityHealthAnalyticsCustomModule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule); - - /** SecurityHealthAnalyticsCustomModule name. */ - public name: string; - - /** SecurityHealthAnalyticsCustomModule displayName. */ - public displayName: string; - - /** SecurityHealthAnalyticsCustomModule enablementState. */ - public enablementState: (google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState); - - /** SecurityHealthAnalyticsCustomModule updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** SecurityHealthAnalyticsCustomModule lastEditor. */ - public lastEditor: string; - - /** SecurityHealthAnalyticsCustomModule ancestorModule. */ - public ancestorModule: string; - - /** SecurityHealthAnalyticsCustomModule customConfig. */ - public customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); - - /** - * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. - * @param [properties] Properties to set - * @returns SecurityHealthAnalyticsCustomModule instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; - - /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @param message SecurityHealthAnalyticsCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; - - /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; - - /** - * Verifies a SecurityHealthAnalyticsCustomModule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SecurityHealthAnalyticsCustomModule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule; - - /** - * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. - * @param message SecurityHealthAnalyticsCustomModule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SecurityHealthAnalyticsCustomModule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SecurityHealthAnalyticsCustomModule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SecurityHealthAnalyticsCustomModule { - - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2, - INHERITED = 3 - } - } - - /** Properties of a CustomConfig. */ - interface ICustomConfig { - - /** CustomConfig predicate */ - predicate?: (google.type.IExpr|null); - - /** CustomConfig customOutput */ - customOutput?: (google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null); - - /** CustomConfig resourceSelector */ - resourceSelector?: (google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null); - - /** CustomConfig severity */ - severity?: (google.cloud.securitycentermanagement.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycentermanagement.v1.CustomConfig.Severity|null); - - /** CustomConfig description */ - description?: (string|null); - - /** CustomConfig recommendation */ - recommendation?: (string|null); - } - - /** Represents a CustomConfig. */ - class CustomConfig implements ICustomConfig { - - /** - * Constructs a new CustomConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ICustomConfig); - - /** CustomConfig predicate. */ - public predicate?: (google.type.IExpr|null); - - /** CustomConfig customOutput. */ - public customOutput?: (google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null); - - /** CustomConfig resourceSelector. */ - public resourceSelector?: (google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null); - - /** CustomConfig severity. */ - public severity: (google.cloud.securitycentermanagement.v1.CustomConfig.Severity|keyof typeof google.cloud.securitycentermanagement.v1.CustomConfig.Severity); - - /** CustomConfig description. */ - public description: string; - - /** CustomConfig recommendation. */ - public recommendation: string; - - /** - * Creates a new CustomConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomConfig instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ICustomConfig): google.cloud.securitycentermanagement.v1.CustomConfig; - - /** - * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. - * @param message CustomConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. - * @param message CustomConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ICustomConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig; - - /** - * Decodes a CustomConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig; - - /** - * Verifies a CustomConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig; - - /** - * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. - * @param message CustomConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CustomConfig { - - /** Properties of a CustomOutputSpec. */ - interface ICustomOutputSpec { - - /** CustomOutputSpec properties */ - properties?: (google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty[]|null); - } - - /** Represents a CustomOutputSpec. */ - class CustomOutputSpec implements ICustomOutputSpec { - - /** - * Constructs a new CustomOutputSpec. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec); - - /** CustomOutputSpec properties. */ - public properties: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty[]; - - /** - * Creates a new CustomOutputSpec instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomOutputSpec instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; - - /** - * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @param message CustomOutputSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @param message CustomOutputSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomOutputSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; - - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomOutputSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; - - /** - * Verifies a CustomOutputSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomOutputSpec - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec; - - /** - * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. - * @param message CustomOutputSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomOutputSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomOutputSpec - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CustomOutputSpec { - - /** Properties of a Property. */ - interface IProperty { - - /** Property name */ - name?: (string|null); - - /** Property valueExpression */ - valueExpression?: (google.type.IExpr|null); - } - - /** Represents a Property. */ - class Property implements IProperty { - - /** - * Constructs a new Property. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty); - - /** Property name. */ - public name: string; - - /** Property valueExpression. */ - public valueExpression?: (google.type.IExpr|null); - - /** - * Creates a new Property instance using the specified properties. - * @param [properties] Properties to set - * @returns Property instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; - - /** - * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @param message Property message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @param message Property message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Property message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; - - /** - * Decodes a Property message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; - - /** - * Verifies a Property message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Property message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Property - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property; - - /** - * Creates a plain object from a Property message. Also converts values to other types if specified. - * @param message Property - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Property to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Property - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ResourceSelector. */ - interface IResourceSelector { - - /** ResourceSelector resourceTypes */ - resourceTypes?: (string[]|null); - } - - /** Represents a ResourceSelector. */ - class ResourceSelector implements IResourceSelector { - - /** - * Constructs a new ResourceSelector. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector); - - /** ResourceSelector resourceTypes. */ - public resourceTypes: string[]; - - /** - * Creates a new ResourceSelector instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceSelector instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; - - /** - * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @param message ResourceSelector message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @param message ResourceSelector message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; - - /** - * Verifies a ResourceSelector message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceSelector message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceSelector - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector; - - /** - * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. - * @param message ResourceSelector - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceSelector to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceSelector - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - CRITICAL = 1, - HIGH = 2, - MEDIUM = 3, - LOW = 4 - } - } - - /** Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. */ - interface IListSecurityHealthAnalyticsCustomModulesRequest { - - /** ListSecurityHealthAnalyticsCustomModulesRequest parent */ - parent?: (string|null); - - /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize */ - pageSize?: (number|null); - - /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListSecurityHealthAnalyticsCustomModulesRequest. */ - class ListSecurityHealthAnalyticsCustomModulesRequest implements IListSecurityHealthAnalyticsCustomModulesRequest { - - /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest); - - /** ListSecurityHealthAnalyticsCustomModulesRequest parent. */ - public parent: string; - - /** ListSecurityHealthAnalyticsCustomModulesRequest pageSize. */ - public pageSize: number; - - /** ListSecurityHealthAnalyticsCustomModulesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSecurityHealthAnalyticsCustomModulesRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSecurityHealthAnalyticsCustomModulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListSecurityHealthAnalyticsCustomModulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. */ - interface IListSecurityHealthAnalyticsCustomModulesResponse { - - /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ - securityHealthAnalyticsCustomModules?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null); - - /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSecurityHealthAnalyticsCustomModulesResponse. */ - class ListSecurityHealthAnalyticsCustomModulesResponse implements IListSecurityHealthAnalyticsCustomModulesResponse { - - /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse); - - /** ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ - public securityHealthAnalyticsCustomModules: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]; - - /** ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSecurityHealthAnalyticsCustomModulesResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSecurityHealthAnalyticsCustomModulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListSecurityHealthAnalyticsCustomModulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ - interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest { - - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent */ - parent?: (string|null); - - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize */ - pageSize?: (number|null); - - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. */ - class ListDescendantSecurityHealthAnalyticsCustomModulesRequest implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest { - - /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest); - - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. */ - public parent: string; - - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. */ - public pageSize: number; - - /** ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest; - - /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ - interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse { - - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules */ - securityHealthAnalyticsCustomModules?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null); - - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. */ - class ListDescendantSecurityHealthAnalyticsCustomModulesResponse implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse { - - /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse); - - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. */ - public securityHealthAnalyticsCustomModules: google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]; - - /** ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDescendantSecurityHealthAnalyticsCustomModulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse; - - /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. */ - interface IGetSecurityHealthAnalyticsCustomModuleRequest { - - /** GetSecurityHealthAnalyticsCustomModuleRequest name */ - name?: (string|null); - } - - /** Represents a GetSecurityHealthAnalyticsCustomModuleRequest. */ - class GetSecurityHealthAnalyticsCustomModuleRequest implements IGetSecurityHealthAnalyticsCustomModuleRequest { - - /** - * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest); - - /** GetSecurityHealthAnalyticsCustomModuleRequest name. */ - public name: string; - - /** - * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSecurityHealthAnalyticsCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSecurityHealthAnalyticsCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message GetSecurityHealthAnalyticsCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. */ - interface ICreateSecurityHealthAnalyticsCustomModuleRequest { - - /** CreateSecurityHealthAnalyticsCustomModuleRequest parent */ - parent?: (string|null); - - /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ - securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); - - /** CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. */ - class CreateSecurityHealthAnalyticsCustomModuleRequest implements ICreateSecurityHealthAnalyticsCustomModuleRequest { - - /** - * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest); - - /** CreateSecurityHealthAnalyticsCustomModuleRequest parent. */ - public parent: string; - - /** CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ - public securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); - - /** CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSecurityHealthAnalyticsCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message CreateSecurityHealthAnalyticsCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ - interface IUpdateSecurityHealthAnalyticsCustomModuleRequest { - - /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule */ - securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); - - /** UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. */ - class UpdateSecurityHealthAnalyticsCustomModuleRequest implements IUpdateSecurityHealthAnalyticsCustomModuleRequest { - - /** - * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest); - - /** UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. */ - public securityHealthAnalyticsCustomModule?: (google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null); - - /** UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateSecurityHealthAnalyticsCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message UpdateSecurityHealthAnalyticsCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ - interface IDeleteSecurityHealthAnalyticsCustomModuleRequest { - - /** DeleteSecurityHealthAnalyticsCustomModuleRequest name */ - name?: (string|null); - - /** DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. */ - class DeleteSecurityHealthAnalyticsCustomModuleRequest implements IDeleteSecurityHealthAnalyticsCustomModuleRequest { - - /** - * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest); - - /** DeleteSecurityHealthAnalyticsCustomModuleRequest name. */ - public name: string; - - /** DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSecurityHealthAnalyticsCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message DeleteSecurityHealthAnalyticsCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ - interface ISimulateSecurityHealthAnalyticsCustomModuleRequest { - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent */ - parent?: (string|null); - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig */ - customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource */ - resource?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); - } - - /** Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. */ - class SimulateSecurityHealthAnalyticsCustomModuleRequest implements ISimulateSecurityHealthAnalyticsCustomModuleRequest { - - /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest); - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest parent. */ - public parent: string; - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. */ - public customConfig?: (google.cloud.securitycentermanagement.v1.ICustomConfig|null); - - /** SimulateSecurityHealthAnalyticsCustomModuleRequest resource. */ - public resource?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null); - - /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulateSecurityHealthAnalyticsCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest; - - /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @param message SimulateSecurityHealthAnalyticsCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SimulateSecurityHealthAnalyticsCustomModuleRequest { - - /** Properties of a SimulatedResource. */ - interface ISimulatedResource { - - /** SimulatedResource resourceType */ - resourceType?: (string|null); - - /** SimulatedResource resourceData */ - resourceData?: (google.protobuf.IStruct|null); - - /** SimulatedResource iamPolicyData */ - iamPolicyData?: (google.iam.v1.IPolicy|null); - } - - /** Represents a SimulatedResource. */ - class SimulatedResource implements ISimulatedResource { - - /** - * Constructs a new SimulatedResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource); - - /** SimulatedResource resourceType. */ - public resourceType: string; - - /** SimulatedResource resourceData. */ - public resourceData?: (google.protobuf.IStruct|null); - - /** SimulatedResource iamPolicyData. */ - public iamPolicyData?: (google.iam.v1.IPolicy|null); - - /** - * Creates a new SimulatedResource instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulatedResource instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @param message SimulatedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @param message SimulatedResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulatedResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimulatedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimulatedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Verifies a SimulatedResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimulatedResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulatedResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource; - - /** - * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. - * @param message SimulatedResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimulatedResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimulatedResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SimulatedFinding. */ - interface ISimulatedFinding { - - /** SimulatedFinding name */ - name?: (string|null); - - /** SimulatedFinding parent */ - parent?: (string|null); - - /** SimulatedFinding resourceName */ - resourceName?: (string|null); - - /** SimulatedFinding category */ - category?: (string|null); - - /** SimulatedFinding state */ - state?: (google.cloud.securitycentermanagement.v1.SimulatedFinding.State|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.State|null); - - /** SimulatedFinding sourceProperties */ - sourceProperties?: ({ [k: string]: google.protobuf.IValue }|null); - - /** SimulatedFinding eventTime */ - eventTime?: (google.protobuf.ITimestamp|null); - - /** SimulatedFinding severity */ - severity?: (google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|null); - - /** SimulatedFinding findingClass */ - findingClass?: (google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|null); - } - - /** Represents a SimulatedFinding. */ - class SimulatedFinding implements ISimulatedFinding { - - /** - * Constructs a new SimulatedFinding. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ISimulatedFinding); - - /** SimulatedFinding name. */ - public name: string; - - /** SimulatedFinding parent. */ - public parent: string; - - /** SimulatedFinding resourceName. */ - public resourceName: string; - - /** SimulatedFinding category. */ - public category: string; - - /** SimulatedFinding state. */ - public state: (google.cloud.securitycentermanagement.v1.SimulatedFinding.State|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.State); - - /** SimulatedFinding sourceProperties. */ - public sourceProperties: { [k: string]: google.protobuf.IValue }; - - /** SimulatedFinding eventTime. */ - public eventTime?: (google.protobuf.ITimestamp|null); - - /** SimulatedFinding severity. */ - public severity: (google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity); - - /** SimulatedFinding findingClass. */ - public findingClass: (google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|keyof typeof google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass); - - /** - * Creates a new SimulatedFinding instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulatedFinding instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ISimulatedFinding): google.cloud.securitycentermanagement.v1.SimulatedFinding; - - /** - * Encodes the specified SimulatedFinding message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. - * @param message SimulatedFinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ISimulatedFinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimulatedFinding message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. - * @param message SimulatedFinding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISimulatedFinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulatedFinding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimulatedFinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulatedFinding; - - /** - * Decodes a SimulatedFinding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimulatedFinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulatedFinding; - - /** - * Verifies a SimulatedFinding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimulatedFinding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulatedFinding - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulatedFinding; - - /** - * Creates a plain object from a SimulatedFinding message. Also converts values to other types if specified. - * @param message SimulatedFinding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SimulatedFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimulatedFinding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimulatedFinding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SimulatedFinding { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - INACTIVE = 2 - } - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - CRITICAL = 1, - HIGH = 2, - MEDIUM = 3, - LOW = 4 - } - - /** FindingClass enum. */ - enum FindingClass { - FINDING_CLASS_UNSPECIFIED = 0, - THREAT = 1, - VULNERABILITY = 2, - MISCONFIGURATION = 3, - OBSERVATION = 4, - SCC_ERROR = 5, - POSTURE_VIOLATION = 6, - TOXIC_COMBINATION = 7 - } - } - - /** Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ - interface ISimulateSecurityHealthAnalyticsCustomModuleResponse { - - /** SimulateSecurityHealthAnalyticsCustomModuleResponse result */ - result?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); - } - - /** Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. */ - class SimulateSecurityHealthAnalyticsCustomModuleResponse implements ISimulateSecurityHealthAnalyticsCustomModuleResponse { - - /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse); - - /** SimulateSecurityHealthAnalyticsCustomModuleResponse result. */ - public result?: (google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null); - - /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. - * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; - - /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulateSecurityHealthAnalyticsCustomModuleResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse; - - /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. - * @param message SimulateSecurityHealthAnalyticsCustomModuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SimulateSecurityHealthAnalyticsCustomModuleResponse { - - /** Properties of a SimulatedResult. */ - interface ISimulatedResult { - - /** SimulatedResult finding */ - finding?: (google.cloud.securitycentermanagement.v1.ISimulatedFinding|null); - - /** SimulatedResult noViolation */ - noViolation?: (google.protobuf.IEmpty|null); - - /** SimulatedResult error */ - error?: (google.rpc.IStatus|null); - } - - /** Represents a SimulatedResult. */ - class SimulatedResult implements ISimulatedResult { - - /** - * Constructs a new SimulatedResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult); - - /** SimulatedResult finding. */ - public finding?: (google.cloud.securitycentermanagement.v1.ISimulatedFinding|null); - - /** SimulatedResult noViolation. */ - public noViolation?: (google.protobuf.IEmpty|null); - - /** SimulatedResult error. */ - public error?: (google.rpc.IStatus|null); - - /** SimulatedResult result. */ - public result?: ("finding"|"noViolation"|"error"); - - /** - * Creates a new SimulatedResult instance using the specified properties. - * @param [properties] Properties to set - * @returns SimulatedResult instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; - - /** - * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @param message SimulatedResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @param message SimulatedResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimulatedResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimulatedResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; - - /** - * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimulatedResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; - - /** - * Verifies a SimulatedResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimulatedResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulatedResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult; - - /** - * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. - * @param message SimulatedResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimulatedResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SimulatedResult - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EffectiveEventThreatDetectionCustomModule. */ - interface IEffectiveEventThreatDetectionCustomModule { - - /** EffectiveEventThreatDetectionCustomModule name */ - name?: (string|null); - - /** EffectiveEventThreatDetectionCustomModule config */ - config?: (google.protobuf.IStruct|null); - - /** EffectiveEventThreatDetectionCustomModule enablementState */ - enablementState?: (google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|null); - - /** EffectiveEventThreatDetectionCustomModule type */ - type?: (string|null); - - /** EffectiveEventThreatDetectionCustomModule displayName */ - displayName?: (string|null); - - /** EffectiveEventThreatDetectionCustomModule description */ - description?: (string|null); - } - - /** Represents an EffectiveEventThreatDetectionCustomModule. */ - class EffectiveEventThreatDetectionCustomModule implements IEffectiveEventThreatDetectionCustomModule { - - /** - * Constructs a new EffectiveEventThreatDetectionCustomModule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule); - - /** EffectiveEventThreatDetectionCustomModule name. */ - public name: string; - - /** EffectiveEventThreatDetectionCustomModule config. */ - public config?: (google.protobuf.IStruct|null); - - /** EffectiveEventThreatDetectionCustomModule enablementState. */ - public enablementState: (google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState); - - /** EffectiveEventThreatDetectionCustomModule type. */ - public type: string; - - /** EffectiveEventThreatDetectionCustomModule displayName. */ - public displayName: string; - - /** EffectiveEventThreatDetectionCustomModule description. */ - public description: string; - - /** - * Creates a new EffectiveEventThreatDetectionCustomModule instance using the specified properties. - * @param [properties] Properties to set - * @returns EffectiveEventThreatDetectionCustomModule instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; - - /** - * Encodes the specified EffectiveEventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. - * @param message EffectiveEventThreatDetectionCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EffectiveEventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. - * @param message EffectiveEventThreatDetectionCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EffectiveEventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; - - /** - * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EffectiveEventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; - - /** - * Verifies an EffectiveEventThreatDetectionCustomModule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EffectiveEventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EffectiveEventThreatDetectionCustomModule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule; - - /** - * Creates a plain object from an EffectiveEventThreatDetectionCustomModule message. Also converts values to other types if specified. - * @param message EffectiveEventThreatDetectionCustomModule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EffectiveEventThreatDetectionCustomModule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EffectiveEventThreatDetectionCustomModule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EffectiveEventThreatDetectionCustomModule { - - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2 - } - } - - /** Properties of a ListEffectiveEventThreatDetectionCustomModulesRequest. */ - interface IListEffectiveEventThreatDetectionCustomModulesRequest { - - /** ListEffectiveEventThreatDetectionCustomModulesRequest parent */ - parent?: (string|null); - - /** ListEffectiveEventThreatDetectionCustomModulesRequest pageSize */ - pageSize?: (number|null); - - /** ListEffectiveEventThreatDetectionCustomModulesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListEffectiveEventThreatDetectionCustomModulesRequest. */ - class ListEffectiveEventThreatDetectionCustomModulesRequest implements IListEffectiveEventThreatDetectionCustomModulesRequest { - - /** - * Constructs a new ListEffectiveEventThreatDetectionCustomModulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest); - - /** ListEffectiveEventThreatDetectionCustomModulesRequest parent. */ - public parent: string; - - /** ListEffectiveEventThreatDetectionCustomModulesRequest pageSize. */ - public pageSize: number; - - /** ListEffectiveEventThreatDetectionCustomModulesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListEffectiveEventThreatDetectionCustomModulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEffectiveEventThreatDetectionCustomModulesRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; - - /** - * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @param message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @param message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEffectiveEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEffectiveEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; - - /** - * Verifies a ListEffectiveEventThreatDetectionCustomModulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEffectiveEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEffectiveEventThreatDetectionCustomModulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest; - - /** - * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListEffectiveEventThreatDetectionCustomModulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEffectiveEventThreatDetectionCustomModulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEffectiveEventThreatDetectionCustomModulesResponse. */ - interface IListEffectiveEventThreatDetectionCustomModulesResponse { - - /** ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules */ - effectiveEventThreatDetectionCustomModules?: (google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[]|null); - - /** ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEffectiveEventThreatDetectionCustomModulesResponse. */ - class ListEffectiveEventThreatDetectionCustomModulesResponse implements IListEffectiveEventThreatDetectionCustomModulesResponse { - - /** - * Constructs a new ListEffectiveEventThreatDetectionCustomModulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse); - - /** ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules. */ - public effectiveEventThreatDetectionCustomModules: google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[]; - - /** ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEffectiveEventThreatDetectionCustomModulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEffectiveEventThreatDetectionCustomModulesResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; - - /** - * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @param message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @param message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEffectiveEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEffectiveEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; - - /** - * Verifies a ListEffectiveEventThreatDetectionCustomModulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEffectiveEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEffectiveEventThreatDetectionCustomModulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse; - - /** - * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListEffectiveEventThreatDetectionCustomModulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEffectiveEventThreatDetectionCustomModulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEffectiveEventThreatDetectionCustomModuleRequest. */ - interface IGetEffectiveEventThreatDetectionCustomModuleRequest { - - /** GetEffectiveEventThreatDetectionCustomModuleRequest name */ - name?: (string|null); - } - - /** Represents a GetEffectiveEventThreatDetectionCustomModuleRequest. */ - class GetEffectiveEventThreatDetectionCustomModuleRequest implements IGetEffectiveEventThreatDetectionCustomModuleRequest { - - /** - * Constructs a new GetEffectiveEventThreatDetectionCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest); - - /** GetEffectiveEventThreatDetectionCustomModuleRequest name. */ - public name: string; - - /** - * Creates a new GetEffectiveEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEffectiveEventThreatDetectionCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; - - /** - * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEffectiveEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; - - /** - * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEffectiveEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; - - /** - * Verifies a GetEffectiveEventThreatDetectionCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEffectiveEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEffectiveEventThreatDetectionCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest; - - /** - * Creates a plain object from a GetEffectiveEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @param message GetEffectiveEventThreatDetectionCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEffectiveEventThreatDetectionCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEffectiveEventThreatDetectionCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EventThreatDetectionCustomModule. */ - interface IEventThreatDetectionCustomModule { - - /** EventThreatDetectionCustomModule name */ - name?: (string|null); - - /** EventThreatDetectionCustomModule config */ - config?: (google.protobuf.IStruct|null); - - /** EventThreatDetectionCustomModule ancestorModule */ - ancestorModule?: (string|null); - - /** EventThreatDetectionCustomModule enablementState */ - enablementState?: (google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|null); - - /** EventThreatDetectionCustomModule type */ - type?: (string|null); - - /** EventThreatDetectionCustomModule displayName */ - displayName?: (string|null); - - /** EventThreatDetectionCustomModule description */ - description?: (string|null); - - /** EventThreatDetectionCustomModule updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** EventThreatDetectionCustomModule lastEditor */ - lastEditor?: (string|null); - } - - /** Represents an EventThreatDetectionCustomModule. */ - class EventThreatDetectionCustomModule implements IEventThreatDetectionCustomModule { - - /** - * Constructs a new EventThreatDetectionCustomModule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule); - - /** EventThreatDetectionCustomModule name. */ - public name: string; - - /** EventThreatDetectionCustomModule config. */ - public config?: (google.protobuf.IStruct|null); - - /** EventThreatDetectionCustomModule ancestorModule. */ - public ancestorModule: string; - - /** EventThreatDetectionCustomModule enablementState. */ - public enablementState: (google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|keyof typeof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState); - - /** EventThreatDetectionCustomModule type. */ - public type: string; - - /** EventThreatDetectionCustomModule displayName. */ - public displayName: string; - - /** EventThreatDetectionCustomModule description. */ - public description: string; - - /** EventThreatDetectionCustomModule updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** EventThreatDetectionCustomModule lastEditor. */ - public lastEditor: string; - - /** - * Creates a new EventThreatDetectionCustomModule instance using the specified properties. - * @param [properties] Properties to set - * @returns EventThreatDetectionCustomModule instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; - - /** - * Encodes the specified EventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. - * @param message EventThreatDetectionCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. - * @param message EventThreatDetectionCustomModule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; - - /** - * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; - - /** - * Verifies an EventThreatDetectionCustomModule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventThreatDetectionCustomModule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule; - - /** - * Creates a plain object from an EventThreatDetectionCustomModule message. Also converts values to other types if specified. - * @param message EventThreatDetectionCustomModule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventThreatDetectionCustomModule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventThreatDetectionCustomModule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EventThreatDetectionCustomModule { - - /** EnablementState enum. */ - enum EnablementState { - ENABLEMENT_STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2, - INHERITED = 3 - } - } - - /** Properties of a ListEventThreatDetectionCustomModulesRequest. */ - interface IListEventThreatDetectionCustomModulesRequest { - - /** ListEventThreatDetectionCustomModulesRequest parent */ - parent?: (string|null); - - /** ListEventThreatDetectionCustomModulesRequest pageSize */ - pageSize?: (number|null); - - /** ListEventThreatDetectionCustomModulesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListEventThreatDetectionCustomModulesRequest. */ - class ListEventThreatDetectionCustomModulesRequest implements IListEventThreatDetectionCustomModulesRequest { - - /** - * Constructs a new ListEventThreatDetectionCustomModulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest); - - /** ListEventThreatDetectionCustomModulesRequest parent. */ - public parent: string; - - /** ListEventThreatDetectionCustomModulesRequest pageSize. */ - public pageSize: number; - - /** ListEventThreatDetectionCustomModulesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListEventThreatDetectionCustomModulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEventThreatDetectionCustomModulesRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; - - /** - * Encodes the specified ListEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @param message ListEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @param message ListEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; - - /** - * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; - - /** - * Verifies a ListEventThreatDetectionCustomModulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEventThreatDetectionCustomModulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest; - - /** - * Creates a plain object from a ListEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListEventThreatDetectionCustomModulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEventThreatDetectionCustomModulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEventThreatDetectionCustomModulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEventThreatDetectionCustomModulesResponse. */ - interface IListEventThreatDetectionCustomModulesResponse { - - /** ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules */ - eventThreatDetectionCustomModules?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null); - - /** ListEventThreatDetectionCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEventThreatDetectionCustomModulesResponse. */ - class ListEventThreatDetectionCustomModulesResponse implements IListEventThreatDetectionCustomModulesResponse { - - /** - * Constructs a new ListEventThreatDetectionCustomModulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse); - - /** ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. */ - public eventThreatDetectionCustomModules: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]; - - /** ListEventThreatDetectionCustomModulesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEventThreatDetectionCustomModulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEventThreatDetectionCustomModulesResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; - - /** - * Encodes the specified ListEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @param message ListEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @param message ListEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; - - /** - * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; - - /** - * Verifies a ListEventThreatDetectionCustomModulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEventThreatDetectionCustomModulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse; - - /** - * Creates a plain object from a ListEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListEventThreatDetectionCustomModulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEventThreatDetectionCustomModulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEventThreatDetectionCustomModulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDescendantEventThreatDetectionCustomModulesRequest. */ - interface IListDescendantEventThreatDetectionCustomModulesRequest { - - /** ListDescendantEventThreatDetectionCustomModulesRequest parent */ - parent?: (string|null); - - /** ListDescendantEventThreatDetectionCustomModulesRequest pageSize */ - pageSize?: (number|null); - - /** ListDescendantEventThreatDetectionCustomModulesRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListDescendantEventThreatDetectionCustomModulesRequest. */ - class ListDescendantEventThreatDetectionCustomModulesRequest implements IListDescendantEventThreatDetectionCustomModulesRequest { - - /** - * Constructs a new ListDescendantEventThreatDetectionCustomModulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest); - - /** ListDescendantEventThreatDetectionCustomModulesRequest parent. */ - public parent: string; - - /** ListDescendantEventThreatDetectionCustomModulesRequest pageSize. */ - public pageSize: number; - - /** ListDescendantEventThreatDetectionCustomModulesRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListDescendantEventThreatDetectionCustomModulesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDescendantEventThreatDetectionCustomModulesRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; - - /** - * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @param message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @param message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDescendantEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDescendantEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; - - /** - * Verifies a ListDescendantEventThreatDetectionCustomModulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDescendantEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDescendantEventThreatDetectionCustomModulesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest; - - /** - * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. - * @param message ListDescendantEventThreatDetectionCustomModulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDescendantEventThreatDetectionCustomModulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDescendantEventThreatDetectionCustomModulesResponse. */ - interface IListDescendantEventThreatDetectionCustomModulesResponse { - - /** ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules */ - eventThreatDetectionCustomModules?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null); - - /** ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListDescendantEventThreatDetectionCustomModulesResponse. */ - class ListDescendantEventThreatDetectionCustomModulesResponse implements IListDescendantEventThreatDetectionCustomModulesResponse { - - /** - * Constructs a new ListDescendantEventThreatDetectionCustomModulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse); - - /** ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. */ - public eventThreatDetectionCustomModules: google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]; - - /** ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListDescendantEventThreatDetectionCustomModulesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDescendantEventThreatDetectionCustomModulesResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; - - /** - * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @param message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @param message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDescendantEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDescendantEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; - - /** - * Verifies a ListDescendantEventThreatDetectionCustomModulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDescendantEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDescendantEventThreatDetectionCustomModulesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse; - - /** - * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. - * @param message ListDescendantEventThreatDetectionCustomModulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDescendantEventThreatDetectionCustomModulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEventThreatDetectionCustomModuleRequest. */ - interface IGetEventThreatDetectionCustomModuleRequest { - - /** GetEventThreatDetectionCustomModuleRequest name */ - name?: (string|null); - } - - /** Represents a GetEventThreatDetectionCustomModuleRequest. */ - class GetEventThreatDetectionCustomModuleRequest implements IGetEventThreatDetectionCustomModuleRequest { - - /** - * Constructs a new GetEventThreatDetectionCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest); - - /** GetEventThreatDetectionCustomModuleRequest name. */ - public name: string; - - /** - * Creates a new GetEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEventThreatDetectionCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; - - /** - * Encodes the specified GetEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message GetEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message GetEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; - - /** - * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; - - /** - * Verifies a GetEventThreatDetectionCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEventThreatDetectionCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest; - - /** - * Creates a plain object from a GetEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @param message GetEventThreatDetectionCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEventThreatDetectionCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEventThreatDetectionCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateEventThreatDetectionCustomModuleRequest. */ - interface ICreateEventThreatDetectionCustomModuleRequest { - - /** CreateEventThreatDetectionCustomModuleRequest parent */ - parent?: (string|null); - - /** CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule */ - eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); - - /** CreateEventThreatDetectionCustomModuleRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateEventThreatDetectionCustomModuleRequest. */ - class CreateEventThreatDetectionCustomModuleRequest implements ICreateEventThreatDetectionCustomModuleRequest { - - /** - * Constructs a new CreateEventThreatDetectionCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest); - - /** CreateEventThreatDetectionCustomModuleRequest parent. */ - public parent: string; - - /** CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. */ - public eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); - - /** CreateEventThreatDetectionCustomModuleRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEventThreatDetectionCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; - - /** - * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; - - /** - * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; - - /** - * Verifies a CreateEventThreatDetectionCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEventThreatDetectionCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest; - - /** - * Creates a plain object from a CreateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @param message CreateEventThreatDetectionCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEventThreatDetectionCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEventThreatDetectionCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEventThreatDetectionCustomModuleRequest. */ - interface IUpdateEventThreatDetectionCustomModuleRequest { - - /** UpdateEventThreatDetectionCustomModuleRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule */ - eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); - - /** UpdateEventThreatDetectionCustomModuleRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateEventThreatDetectionCustomModuleRequest. */ - class UpdateEventThreatDetectionCustomModuleRequest implements IUpdateEventThreatDetectionCustomModuleRequest { - - /** - * Constructs a new UpdateEventThreatDetectionCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest); - - /** UpdateEventThreatDetectionCustomModuleRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. */ - public eventThreatDetectionCustomModule?: (google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null); - - /** UpdateEventThreatDetectionCustomModuleRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEventThreatDetectionCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; - - /** - * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; - - /** - * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; - - /** - * Verifies an UpdateEventThreatDetectionCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEventThreatDetectionCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest; - - /** - * Creates a plain object from an UpdateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @param message UpdateEventThreatDetectionCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEventThreatDetectionCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEventThreatDetectionCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEventThreatDetectionCustomModuleRequest. */ - interface IDeleteEventThreatDetectionCustomModuleRequest { - - /** DeleteEventThreatDetectionCustomModuleRequest name */ - name?: (string|null); - - /** DeleteEventThreatDetectionCustomModuleRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a DeleteEventThreatDetectionCustomModuleRequest. */ - class DeleteEventThreatDetectionCustomModuleRequest implements IDeleteEventThreatDetectionCustomModuleRequest { - - /** - * Constructs a new DeleteEventThreatDetectionCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest); - - /** DeleteEventThreatDetectionCustomModuleRequest name. */ - public name: string; - - /** DeleteEventThreatDetectionCustomModuleRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new DeleteEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEventThreatDetectionCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; - - /** - * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; - - /** - * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; - - /** - * Verifies a DeleteEventThreatDetectionCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEventThreatDetectionCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest; - - /** - * Creates a plain object from a DeleteEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @param message DeleteEventThreatDetectionCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEventThreatDetectionCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEventThreatDetectionCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateEventThreatDetectionCustomModuleRequest. */ - interface IValidateEventThreatDetectionCustomModuleRequest { - - /** ValidateEventThreatDetectionCustomModuleRequest parent */ - parent?: (string|null); - - /** ValidateEventThreatDetectionCustomModuleRequest rawText */ - rawText?: (string|null); - - /** ValidateEventThreatDetectionCustomModuleRequest type */ - type?: (string|null); - } - - /** Represents a ValidateEventThreatDetectionCustomModuleRequest. */ - class ValidateEventThreatDetectionCustomModuleRequest implements IValidateEventThreatDetectionCustomModuleRequest { - - /** - * Constructs a new ValidateEventThreatDetectionCustomModuleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest); - - /** ValidateEventThreatDetectionCustomModuleRequest parent. */ - public parent: string; - - /** ValidateEventThreatDetectionCustomModuleRequest rawText. */ - public rawText: string; - - /** ValidateEventThreatDetectionCustomModuleRequest type. */ - public type: string; - - /** - * Creates a new ValidateEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateEventThreatDetectionCustomModuleRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @param message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; - - /** - * Verifies a ValidateEventThreatDetectionCustomModuleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateEventThreatDetectionCustomModuleRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest; - - /** - * Creates a plain object from a ValidateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @param message ValidateEventThreatDetectionCustomModuleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateEventThreatDetectionCustomModuleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateEventThreatDetectionCustomModuleRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateEventThreatDetectionCustomModuleResponse. */ - interface IValidateEventThreatDetectionCustomModuleResponse { - - /** ValidateEventThreatDetectionCustomModuleResponse errors */ - errors?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError[]|null); - } - - /** Represents a ValidateEventThreatDetectionCustomModuleResponse. */ - class ValidateEventThreatDetectionCustomModuleResponse implements IValidateEventThreatDetectionCustomModuleResponse { - - /** - * Constructs a new ValidateEventThreatDetectionCustomModuleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse); - - /** ValidateEventThreatDetectionCustomModuleResponse errors. */ - public errors: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError[]; - - /** - * Creates a new ValidateEventThreatDetectionCustomModuleResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateEventThreatDetectionCustomModuleResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. - * @param message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. - * @param message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateEventThreatDetectionCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateEventThreatDetectionCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; - - /** - * Verifies a ValidateEventThreatDetectionCustomModuleResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidateEventThreatDetectionCustomModuleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateEventThreatDetectionCustomModuleResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse; - - /** - * Creates a plain object from a ValidateEventThreatDetectionCustomModuleResponse message. Also converts values to other types if specified. - * @param message ValidateEventThreatDetectionCustomModuleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateEventThreatDetectionCustomModuleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateEventThreatDetectionCustomModuleResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ValidateEventThreatDetectionCustomModuleResponse { - - /** Properties of a CustomModuleValidationError. */ - interface ICustomModuleValidationError { - - /** CustomModuleValidationError description */ - description?: (string|null); - - /** CustomModuleValidationError fieldPath */ - fieldPath?: (string|null); - - /** CustomModuleValidationError start */ - start?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); - - /** CustomModuleValidationError end */ - end?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); - } - - /** Represents a CustomModuleValidationError. */ - class CustomModuleValidationError implements ICustomModuleValidationError { - - /** - * Constructs a new CustomModuleValidationError. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError); - - /** CustomModuleValidationError description. */ - public description: string; - - /** CustomModuleValidationError fieldPath. */ - public fieldPath: string; - - /** CustomModuleValidationError start. */ - public start?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); - - /** CustomModuleValidationError end. */ - public end?: (google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null); - - /** CustomModuleValidationError _start. */ - public _start?: "start"; - - /** CustomModuleValidationError _end. */ - public _end?: "end"; - - /** - * Creates a new CustomModuleValidationError instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomModuleValidationError instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; - - /** - * Encodes the specified CustomModuleValidationError message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. - * @param message CustomModuleValidationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomModuleValidationError message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. - * @param message CustomModuleValidationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomModuleValidationError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomModuleValidationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; - - /** - * Decodes a CustomModuleValidationError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomModuleValidationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; - - /** - * Verifies a CustomModuleValidationError message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomModuleValidationError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomModuleValidationError - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError; - - /** - * Creates a plain object from a CustomModuleValidationError message. Also converts values to other types if specified. - * @param message CustomModuleValidationError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomModuleValidationError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomModuleValidationError - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Position. */ - interface IPosition { - - /** Position lineNumber */ - lineNumber?: (number|null); - - /** Position columnNumber */ - columnNumber?: (number|null); - } - - /** Represents a Position. */ - class Position implements IPosition { - - /** - * Constructs a new Position. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition); - - /** Position lineNumber. */ - public lineNumber: number; - - /** Position columnNumber. */ - public columnNumber: number; - - /** - * Creates a new Position instance using the specified properties. - * @param [properties] Properties to set - * @returns Position instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; - - /** - * Encodes the specified Position message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. - * @param message Position message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. - * @param message Position message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Position message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Position - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; - - /** - * Decodes a Position message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Position - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; - - /** - * Verifies a Position message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Position message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Position - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position; - - /** - * Creates a plain object from a Position message. Also converts values to other types if specified. - * @param message Position - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Position to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Position - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GetSecurityCenterServiceRequest. */ - interface IGetSecurityCenterServiceRequest { - - /** GetSecurityCenterServiceRequest name */ - name?: (string|null); - - /** GetSecurityCenterServiceRequest showEligibleModulesOnly */ - showEligibleModulesOnly?: (boolean|null); - } - - /** Represents a GetSecurityCenterServiceRequest. */ - class GetSecurityCenterServiceRequest implements IGetSecurityCenterServiceRequest { - - /** - * Constructs a new GetSecurityCenterServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest); - - /** GetSecurityCenterServiceRequest name. */ - public name: string; - - /** GetSecurityCenterServiceRequest showEligibleModulesOnly. */ - public showEligibleModulesOnly: boolean; - - /** - * Creates a new GetSecurityCenterServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSecurityCenterServiceRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; - - /** - * Encodes the specified GetSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. - * @param message GetSecurityCenterServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. - * @param message GetSecurityCenterServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; - - /** - * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; - - /** - * Verifies a GetSecurityCenterServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSecurityCenterServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest; - - /** - * Creates a plain object from a GetSecurityCenterServiceRequest message. Also converts values to other types if specified. - * @param message GetSecurityCenterServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSecurityCenterServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSecurityCenterServiceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSecurityCenterServicesRequest. */ - interface IListSecurityCenterServicesRequest { - - /** ListSecurityCenterServicesRequest parent */ - parent?: (string|null); - - /** ListSecurityCenterServicesRequest pageSize */ - pageSize?: (number|null); - - /** ListSecurityCenterServicesRequest pageToken */ - pageToken?: (string|null); - - /** ListSecurityCenterServicesRequest showEligibleModulesOnly */ - showEligibleModulesOnly?: (boolean|null); - } - - /** Represents a ListSecurityCenterServicesRequest. */ - class ListSecurityCenterServicesRequest implements IListSecurityCenterServicesRequest { - - /** - * Constructs a new ListSecurityCenterServicesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest); - - /** ListSecurityCenterServicesRequest parent. */ - public parent: string; - - /** ListSecurityCenterServicesRequest pageSize. */ - public pageSize: number; - - /** ListSecurityCenterServicesRequest pageToken. */ - public pageToken: string; - - /** ListSecurityCenterServicesRequest showEligibleModulesOnly. */ - public showEligibleModulesOnly: boolean; - - /** - * Creates a new ListSecurityCenterServicesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSecurityCenterServicesRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; - - /** - * Encodes the specified ListSecurityCenterServicesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. - * @param message ListSecurityCenterServicesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSecurityCenterServicesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. - * @param message ListSecurityCenterServicesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSecurityCenterServicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; - - /** - * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSecurityCenterServicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; - - /** - * Verifies a ListSecurityCenterServicesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSecurityCenterServicesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSecurityCenterServicesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest; - - /** - * Creates a plain object from a ListSecurityCenterServicesRequest message. Also converts values to other types if specified. - * @param message ListSecurityCenterServicesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSecurityCenterServicesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSecurityCenterServicesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSecurityCenterServicesResponse. */ - interface IListSecurityCenterServicesResponse { - - /** ListSecurityCenterServicesResponse securityCenterServices */ - securityCenterServices?: (google.cloud.securitycentermanagement.v1.ISecurityCenterService[]|null); - - /** ListSecurityCenterServicesResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSecurityCenterServicesResponse. */ - class ListSecurityCenterServicesResponse implements IListSecurityCenterServicesResponse { - - /** - * Constructs a new ListSecurityCenterServicesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse); - - /** ListSecurityCenterServicesResponse securityCenterServices. */ - public securityCenterServices: google.cloud.securitycentermanagement.v1.ISecurityCenterService[]; - - /** ListSecurityCenterServicesResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSecurityCenterServicesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSecurityCenterServicesResponse instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; - - /** - * Encodes the specified ListSecurityCenterServicesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. - * @param message ListSecurityCenterServicesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSecurityCenterServicesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. - * @param message ListSecurityCenterServicesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSecurityCenterServicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; - - /** - * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSecurityCenterServicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; - - /** - * Verifies a ListSecurityCenterServicesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSecurityCenterServicesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSecurityCenterServicesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse; - - /** - * Creates a plain object from a ListSecurityCenterServicesResponse message. Also converts values to other types if specified. - * @param message ListSecurityCenterServicesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSecurityCenterServicesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSecurityCenterServicesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateSecurityCenterServiceRequest. */ - interface IUpdateSecurityCenterServiceRequest { - - /** UpdateSecurityCenterServiceRequest securityCenterService */ - securityCenterService?: (google.cloud.securitycentermanagement.v1.ISecurityCenterService|null); - - /** UpdateSecurityCenterServiceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateSecurityCenterServiceRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents an UpdateSecurityCenterServiceRequest. */ - class UpdateSecurityCenterServiceRequest implements IUpdateSecurityCenterServiceRequest { - - /** - * Constructs a new UpdateSecurityCenterServiceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest); - - /** UpdateSecurityCenterServiceRequest securityCenterService. */ - public securityCenterService?: (google.cloud.securitycentermanagement.v1.ISecurityCenterService|null); - - /** UpdateSecurityCenterServiceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateSecurityCenterServiceRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new UpdateSecurityCenterServiceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSecurityCenterServiceRequest instance - */ - public static create(properties?: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; - - /** - * Encodes the specified UpdateSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. - * @param message UpdateSecurityCenterServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. - * @param message UpdateSecurityCenterServiceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; - - /** - * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; - - /** - * Verifies an UpdateSecurityCenterServiceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateSecurityCenterServiceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest; - - /** - * Creates a plain object from an UpdateSecurityCenterServiceRequest message. Also converts values to other types if specified. - * @param message UpdateSecurityCenterServiceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateSecurityCenterServiceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateSecurityCenterServiceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of 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; - } - - /** Properties of a Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Struct - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Value. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value boolValue. */ - public boolValue?: (boolean|null); - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; - - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace iam. */ - namespace iam { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Policy. */ - interface IPolicy { - - /** Policy version */ - version?: (number|null); - - /** Policy bindings */ - bindings?: (google.iam.v1.IBinding[]|null); - - /** Policy auditConfigs */ - auditConfigs?: (google.iam.v1.IAuditConfig[]|null); - - /** Policy etag */ - etag?: (Uint8Array|string|null); - } - - /** Represents a Policy. */ - class Policy implements IPolicy { - - /** - * Constructs a new Policy. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicy); - - /** Policy version. */ - public version: number; - - /** Policy bindings. */ - public bindings: google.iam.v1.IBinding[]; - - /** Policy auditConfigs. */ - public auditConfigs: google.iam.v1.IAuditConfig[]; - - /** Policy etag. */ - public etag: (Uint8Array|string); - - /** - * Creates a new Policy instance using the specified properties. - * @param [properties] Properties to set - * @returns Policy instance - */ - public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; - - /** - * Verifies a Policy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Policy - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @param message Policy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Policy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Policy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Binding. */ - interface IBinding { - - /** Binding role */ - role?: (string|null); - - /** Binding members */ - members?: (string[]|null); - - /** Binding condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a Binding. */ - class Binding implements IBinding { - - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBinding); - - /** Binding role. */ - public role: string; - - /** Binding members. */ - public members: string[]; - - /** Binding condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; - - /** - * Verifies a Binding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditConfig. */ - interface IAuditConfig { - - /** AuditConfig service */ - service?: (string|null); - - /** AuditConfig auditLogConfigs */ - auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); - } - - /** Represents an AuditConfig. */ - class AuditConfig implements IAuditConfig { - - /** - * Constructs a new AuditConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfig); - - /** AuditConfig service. */ - public service: string; - - /** AuditConfig auditLogConfigs. */ - public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfig instance - */ - public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; - - /** - * Verifies an AuditConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @param message AuditConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditLogConfig. */ - interface IAuditLogConfig { - - /** AuditLogConfig logType */ - logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); - - /** AuditLogConfig exemptedMembers */ - exemptedMembers?: (string[]|null); - } - - /** Represents an AuditLogConfig. */ - class AuditLogConfig implements IAuditLogConfig { - - /** - * Constructs a new AuditLogConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditLogConfig); - - /** AuditLogConfig logType. */ - public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); - - /** AuditLogConfig exemptedMembers. */ - public exemptedMembers: string[]; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditLogConfig instance - */ - public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; - - /** - * Verifies an AuditLogConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditLogConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @param message AuditLogConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditLogConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditLogConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditLogConfig { - - /** LogType enum. */ - enum LogType { - LOG_TYPE_UNSPECIFIED = 0, - ADMIN_READ = 1, - DATA_WRITE = 2, - DATA_READ = 3 - } - } - - /** Properties of a PolicyDelta. */ - interface IPolicyDelta { - - /** PolicyDelta bindingDeltas */ - bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - - /** PolicyDelta auditConfigDeltas */ - auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); - } - - /** Represents a PolicyDelta. */ - class PolicyDelta implements IPolicyDelta { - - /** - * Constructs a new PolicyDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicyDelta); - - /** PolicyDelta bindingDeltas. */ - public bindingDeltas: google.iam.v1.IBindingDelta[]; - - /** PolicyDelta auditConfigDeltas. */ - public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDelta instance - */ - public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; - - /** - * Verifies a PolicyDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @param message PolicyDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BindingDelta. */ - interface IBindingDelta { - - /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - - /** BindingDelta role */ - role?: (string|null); - - /** BindingDelta member */ - member?: (string|null); - - /** BindingDelta condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a BindingDelta. */ - class BindingDelta implements IBindingDelta { - - /** - * Constructs a new BindingDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBindingDelta); - - /** BindingDelta action. */ - public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - - /** BindingDelta role. */ - public role: string; - - /** BindingDelta member. */ - public member: string; - - /** BindingDelta condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new BindingDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns BindingDelta instance - */ - public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; - - /** - * Verifies a BindingDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BindingDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @param message BindingDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BindingDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BindingDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BindingDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - - /** Properties of an AuditConfigDelta. */ - interface IAuditConfigDelta { - - /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - - /** AuditConfigDelta service */ - service?: (string|null); - - /** AuditConfigDelta exemptedMember */ - exemptedMember?: (string|null); - - /** AuditConfigDelta logType */ - logType?: (string|null); - } - - /** Represents an AuditConfigDelta. */ - class AuditConfigDelta implements IAuditConfigDelta { - - /** - * Constructs a new AuditConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfigDelta); - - /** AuditConfigDelta action. */ - public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - - /** AuditConfigDelta service. */ - public service: string; - - /** AuditConfigDelta exemptedMember. */ - public exemptedMember: string; - - /** AuditConfigDelta logType. */ - public logType: string; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfigDelta instance - */ - public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; - - /** - * Verifies an AuditConfigDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @param message AuditConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfigDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditConfigDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of an Expr. */ - interface IExpr { - - /** Expr expression */ - expression?: (string|null); - - /** Expr title */ - title?: (string|null); - - /** Expr description */ - description?: (string|null); - - /** Expr location */ - location?: (string|null); - } - - /** Represents an Expr. */ - class Expr implements IExpr { - - /** - * Constructs a new Expr. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IExpr); - - /** Expr expression. */ - public expression: string; - - /** Expr title. */ - public title: string; - - /** Expr description. */ - public description: string; - - /** Expr location. */ - public location: string; - - /** - * Creates a new Expr instance using the specified properties. - * @param [properties] Properties to set - * @returns Expr instance - */ - public static create(properties?: google.type.IExpr): google.type.Expr; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; - - /** - * Verifies an Expr message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Expr message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Expr - */ - public static fromObject(object: { [k: string]: any }): google.type.Expr; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @param message Expr - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Expr to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Expr - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js deleted file mode 100644 index 1b7df205cc9..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.js +++ /dev/null @@ -1,35369 +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_securitycentermanagement_protos || ($protobuf.roots._google_cloud_securitycentermanagement_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.securitycentermanagement = (function() { - - /** - * Namespace securitycentermanagement. - * @memberof google.cloud - * @namespace - */ - var securitycentermanagement = {}; - - securitycentermanagement.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.securitycentermanagement - * @namespace - */ - var v1 = {}; - - v1.SecurityCenterManagement = (function() { - - /** - * Constructs a new SecurityCenterManagement service. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a SecurityCenterManagement - * @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 SecurityCenterManagement(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SecurityCenterManagement.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SecurityCenterManagement; - - /** - * Creates new SecurityCenterManagement service using the specified rpc implementation. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @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 {SecurityCenterManagement} RPC service. Useful where requests and/or responses are streamed. - */ - SecurityCenterManagement.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveSecurityHealthAnalyticsCustomModules}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ListEffectiveSecurityHealthAnalyticsCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} [response] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - */ - - /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @function listEffectiveSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.listEffectiveSecurityHealthAnalyticsCustomModules = function listEffectiveSecurityHealthAnalyticsCustomModules(request, callback) { - return this.rpcCall(listEffectiveSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse, request, callback); - }, "name", { value: "ListEffectiveSecurityHealthAnalyticsCustomModules" }); - - /** - * Calls ListEffectiveSecurityHealthAnalyticsCustomModules. - * @function listEffectiveSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} request ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef GetEffectiveSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} [response] EffectiveSecurityHealthAnalyticsCustomModule - */ - - /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @function getEffectiveSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and EffectiveSecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.getEffectiveSecurityHealthAnalyticsCustomModule = function getEffectiveSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(getEffectiveSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "GetEffectiveSecurityHealthAnalyticsCustomModule" }); - - /** - * Calls GetEffectiveSecurityHealthAnalyticsCustomModule. - * @function getEffectiveSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} request GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityHealthAnalyticsCustomModules}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ListSecurityHealthAnalyticsCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} [response] ListSecurityHealthAnalyticsCustomModulesResponse - */ - - /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @function listSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListSecurityHealthAnalyticsCustomModulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.listSecurityHealthAnalyticsCustomModules = function listSecurityHealthAnalyticsCustomModules(request, callback) { - return this.rpcCall(listSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse, request, callback); - }, "name", { value: "ListSecurityHealthAnalyticsCustomModules" }); - - /** - * Calls ListSecurityHealthAnalyticsCustomModules. - * @function listSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} request ListSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantSecurityHealthAnalyticsCustomModules}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ListDescendantSecurityHealthAnalyticsCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} [response] ListDescendantSecurityHealthAnalyticsCustomModulesResponse - */ - - /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @function listDescendantSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModulesCallback} callback Node-style callback called with the error, if any, and ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.listDescendantSecurityHealthAnalyticsCustomModules = function listDescendantSecurityHealthAnalyticsCustomModules(request, callback) { - return this.rpcCall(listDescendantSecurityHealthAnalyticsCustomModules, $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse, request, callback); - }, "name", { value: "ListDescendantSecurityHealthAnalyticsCustomModules" }); - - /** - * Calls ListDescendantSecurityHealthAnalyticsCustomModules. - * @function listDescendantSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} request ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef GetSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule - */ - - /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @function getSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.getSecurityHealthAnalyticsCustomModule = function getSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(getSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "GetSecurityHealthAnalyticsCustomModule" }); - - /** - * Calls GetSecurityHealthAnalyticsCustomModule. - * @function getSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} request GetSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef CreateSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule - */ - - /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @function createSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.createSecurityHealthAnalyticsCustomModule = function createSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(createSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "CreateSecurityHealthAnalyticsCustomModule" }); - - /** - * Calls CreateSecurityHealthAnalyticsCustomModule. - * @function createSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} request CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef UpdateSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} [response] SecurityHealthAnalyticsCustomModule - */ - - /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @function updateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SecurityHealthAnalyticsCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.updateSecurityHealthAnalyticsCustomModule = function updateSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(updateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule, request, callback); - }, "name", { value: "UpdateSecurityHealthAnalyticsCustomModule" }); - - /** - * Calls UpdateSecurityHealthAnalyticsCustomModule. - * @function updateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} request UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef DeleteSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @function deleteSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.deleteSecurityHealthAnalyticsCustomModule = function deleteSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(deleteSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSecurityHealthAnalyticsCustomModule" }); - - /** - * Calls DeleteSecurityHealthAnalyticsCustomModule. - * @function deleteSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} request DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|simulateSecurityHealthAnalyticsCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef SimulateSecurityHealthAnalyticsCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} [response] SimulateSecurityHealthAnalyticsCustomModuleResponse - */ - - /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @function simulateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModuleCallback} callback Node-style callback called with the error, if any, and SimulateSecurityHealthAnalyticsCustomModuleResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.simulateSecurityHealthAnalyticsCustomModule = function simulateSecurityHealthAnalyticsCustomModule(request, callback) { - return this.rpcCall(simulateSecurityHealthAnalyticsCustomModule, $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse, request, callback); - }, "name", { value: "SimulateSecurityHealthAnalyticsCustomModule" }); - - /** - * Calls SimulateSecurityHealthAnalyticsCustomModule. - * @function simulateSecurityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} request SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEffectiveEventThreatDetectionCustomModules}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ListEffectiveEventThreatDetectionCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} [response] ListEffectiveEventThreatDetectionCustomModulesResponse - */ - - /** - * Calls ListEffectiveEventThreatDetectionCustomModules. - * @function listEffectiveEventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEffectiveEventThreatDetectionCustomModulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.listEffectiveEventThreatDetectionCustomModules = function listEffectiveEventThreatDetectionCustomModules(request, callback) { - return this.rpcCall(listEffectiveEventThreatDetectionCustomModules, $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse, request, callback); - }, "name", { value: "ListEffectiveEventThreatDetectionCustomModules" }); - - /** - * Calls ListEffectiveEventThreatDetectionCustomModules. - * @function listEffectiveEventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} request ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEffectiveEventThreatDetectionCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef GetEffectiveEventThreatDetectionCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} [response] EffectiveEventThreatDetectionCustomModule - */ - - /** - * Calls GetEffectiveEventThreatDetectionCustomModule. - * @function getEffectiveEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EffectiveEventThreatDetectionCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.getEffectiveEventThreatDetectionCustomModule = function getEffectiveEventThreatDetectionCustomModule(request, callback) { - return this.rpcCall(getEffectiveEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule, request, callback); - }, "name", { value: "GetEffectiveEventThreatDetectionCustomModule" }); - - /** - * Calls GetEffectiveEventThreatDetectionCustomModule. - * @function getEffectiveEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} request GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listEventThreatDetectionCustomModules}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ListEventThreatDetectionCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} [response] ListEventThreatDetectionCustomModulesResponse - */ - - /** - * Calls ListEventThreatDetectionCustomModules. - * @function listEventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} request ListEventThreatDetectionCustomModulesRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListEventThreatDetectionCustomModulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.listEventThreatDetectionCustomModules = function listEventThreatDetectionCustomModules(request, callback) { - return this.rpcCall(listEventThreatDetectionCustomModules, $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse, request, callback); - }, "name", { value: "ListEventThreatDetectionCustomModules" }); - - /** - * Calls ListEventThreatDetectionCustomModules. - * @function listEventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} request ListEventThreatDetectionCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listDescendantEventThreatDetectionCustomModules}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ListDescendantEventThreatDetectionCustomModulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} [response] ListDescendantEventThreatDetectionCustomModulesResponse - */ - - /** - * Calls ListDescendantEventThreatDetectionCustomModules. - * @function listDescendantEventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModulesCallback} callback Node-style callback called with the error, if any, and ListDescendantEventThreatDetectionCustomModulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.listDescendantEventThreatDetectionCustomModules = function listDescendantEventThreatDetectionCustomModules(request, callback) { - return this.rpcCall(listDescendantEventThreatDetectionCustomModules, $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest, $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse, request, callback); - }, "name", { value: "ListDescendantEventThreatDetectionCustomModules" }); - - /** - * Calls ListDescendantEventThreatDetectionCustomModules. - * @function listDescendantEventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} request ListDescendantEventThreatDetectionCustomModulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getEventThreatDetectionCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef GetEventThreatDetectionCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule - */ - - /** - * Calls GetEventThreatDetectionCustomModule. - * @function getEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} request GetEventThreatDetectionCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.getEventThreatDetectionCustomModule = function getEventThreatDetectionCustomModule(request, callback) { - return this.rpcCall(getEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, request, callback); - }, "name", { value: "GetEventThreatDetectionCustomModule" }); - - /** - * Calls GetEventThreatDetectionCustomModule. - * @function getEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} request GetEventThreatDetectionCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|createEventThreatDetectionCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef CreateEventThreatDetectionCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule - */ - - /** - * Calls CreateEventThreatDetectionCustomModule. - * @function createEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} request CreateEventThreatDetectionCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.createEventThreatDetectionCustomModule = function createEventThreatDetectionCustomModule(request, callback) { - return this.rpcCall(createEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, request, callback); - }, "name", { value: "CreateEventThreatDetectionCustomModule" }); - - /** - * Calls CreateEventThreatDetectionCustomModule. - * @function createEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} request CreateEventThreatDetectionCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateEventThreatDetectionCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef UpdateEventThreatDetectionCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} [response] EventThreatDetectionCustomModule - */ - - /** - * Calls UpdateEventThreatDetectionCustomModule. - * @function updateEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} request UpdateEventThreatDetectionCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and EventThreatDetectionCustomModule - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.updateEventThreatDetectionCustomModule = function updateEventThreatDetectionCustomModule(request, callback) { - return this.rpcCall(updateEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule, request, callback); - }, "name", { value: "UpdateEventThreatDetectionCustomModule" }); - - /** - * Calls UpdateEventThreatDetectionCustomModule. - * @function updateEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} request UpdateEventThreatDetectionCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|deleteEventThreatDetectionCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef DeleteEventThreatDetectionCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteEventThreatDetectionCustomModule. - * @function deleteEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} request DeleteEventThreatDetectionCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.deleteEventThreatDetectionCustomModule = function deleteEventThreatDetectionCustomModule(request, callback) { - return this.rpcCall(deleteEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteEventThreatDetectionCustomModule" }); - - /** - * Calls DeleteEventThreatDetectionCustomModule. - * @function deleteEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} request DeleteEventThreatDetectionCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|validateEventThreatDetectionCustomModule}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ValidateEventThreatDetectionCustomModuleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} [response] ValidateEventThreatDetectionCustomModuleResponse - */ - - /** - * Calls ValidateEventThreatDetectionCustomModule. - * @function validateEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} request ValidateEventThreatDetectionCustomModuleRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModuleCallback} callback Node-style callback called with the error, if any, and ValidateEventThreatDetectionCustomModuleResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.validateEventThreatDetectionCustomModule = function validateEventThreatDetectionCustomModule(request, callback) { - return this.rpcCall(validateEventThreatDetectionCustomModule, $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest, $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse, request, callback); - }, "name", { value: "ValidateEventThreatDetectionCustomModule" }); - - /** - * Calls ValidateEventThreatDetectionCustomModule. - * @function validateEventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} request ValidateEventThreatDetectionCustomModuleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|getSecurityCenterService}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef GetSecurityCenterServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} [response] SecurityCenterService - */ - - /** - * Calls GetSecurityCenterService. - * @function getSecurityCenterService - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} request GetSecurityCenterServiceRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterServiceCallback} callback Node-style callback called with the error, if any, and SecurityCenterService - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.getSecurityCenterService = function getSecurityCenterService(request, callback) { - return this.rpcCall(getSecurityCenterService, $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest, $root.google.cloud.securitycentermanagement.v1.SecurityCenterService, request, callback); - }, "name", { value: "GetSecurityCenterService" }); - - /** - * Calls GetSecurityCenterService. - * @function getSecurityCenterService - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} request GetSecurityCenterServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|listSecurityCenterServices}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef ListSecurityCenterServicesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} [response] ListSecurityCenterServicesResponse - */ - - /** - * Calls ListSecurityCenterServices. - * @function listSecurityCenterServices - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} request ListSecurityCenterServicesRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServicesCallback} callback Node-style callback called with the error, if any, and ListSecurityCenterServicesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.listSecurityCenterServices = function listSecurityCenterServices(request, callback) { - return this.rpcCall(listSecurityCenterServices, $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest, $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse, request, callback); - }, "name", { value: "ListSecurityCenterServices" }); - - /** - * Calls ListSecurityCenterServices. - * @function listSecurityCenterServices - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} request ListSecurityCenterServicesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.securitycentermanagement.v1.SecurityCenterManagement|updateSecurityCenterService}. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @typedef UpdateSecurityCenterServiceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} [response] SecurityCenterService - */ - - /** - * Calls UpdateSecurityCenterService. - * @function updateSecurityCenterService - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} request UpdateSecurityCenterServiceRequest message or plain object - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterServiceCallback} callback Node-style callback called with the error, if any, and SecurityCenterService - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SecurityCenterManagement.prototype.updateSecurityCenterService = function updateSecurityCenterService(request, callback) { - return this.rpcCall(updateSecurityCenterService, $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest, $root.google.cloud.securitycentermanagement.v1.SecurityCenterService, request, callback); - }, "name", { value: "UpdateSecurityCenterService" }); - - /** - * Calls UpdateSecurityCenterService. - * @function updateSecurityCenterService - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterManagement - * @instance - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} request UpdateSecurityCenterServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return SecurityCenterManagement; - })(); - - v1.SecurityCenterService = (function() { - - /** - * Properties of a SecurityCenterService. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ISecurityCenterService - * @property {string|null} [name] SecurityCenterService name - * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [intendedEnablementState] SecurityCenterService intendedEnablementState - * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [effectiveEnablementState] SecurityCenterService effectiveEnablementState - * @property {Object.|null} [modules] SecurityCenterService modules - * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityCenterService updateTime - * @property {google.protobuf.IStruct|null} [serviceConfig] SecurityCenterService serviceConfig - */ - - /** - * Constructs a new SecurityCenterService. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a SecurityCenterService. - * @implements ISecurityCenterService - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService=} [properties] Properties to set - */ - function SecurityCenterService(properties) { - this.modules = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityCenterService name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @instance - */ - SecurityCenterService.prototype.name = ""; - - /** - * SecurityCenterService intendedEnablementState. - * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} intendedEnablementState - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @instance - */ - SecurityCenterService.prototype.intendedEnablementState = 0; - - /** - * SecurityCenterService effectiveEnablementState. - * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} effectiveEnablementState - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @instance - */ - SecurityCenterService.prototype.effectiveEnablementState = 0; - - /** - * SecurityCenterService modules. - * @member {Object.} modules - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @instance - */ - SecurityCenterService.prototype.modules = $util.emptyObject; - - /** - * SecurityCenterService updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @instance - */ - SecurityCenterService.prototype.updateTime = null; - - /** - * SecurityCenterService serviceConfig. - * @member {google.protobuf.IStruct|null|undefined} serviceConfig - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @instance - */ - SecurityCenterService.prototype.serviceConfig = null; - - /** - * Creates a new SecurityCenterService instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService instance - */ - SecurityCenterService.create = function create(properties) { - return new SecurityCenterService(properties); - }; - - /** - * Encodes the specified SecurityCenterService message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService} message SecurityCenterService message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityCenterService.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.intendedEnablementState != null && Object.hasOwnProperty.call(message, "intendedEnablementState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.intendedEnablementState); - if (message.effectiveEnablementState != null && Object.hasOwnProperty.call(message, "effectiveEnablementState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.effectiveEnablementState); - if (message.modules != null && Object.hasOwnProperty.call(message, "modules")) - for (var keys = Object.keys(message.modules), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.encode(message.modules[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.serviceConfig != null && Object.hasOwnProperty.call(message, "serviceConfig")) - $root.google.protobuf.Struct.encode(message.serviceConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SecurityCenterService message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {google.cloud.securitycentermanagement.v1.ISecurityCenterService} message SecurityCenterService message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityCenterService.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityCenterService message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityCenterService.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.intendedEnablementState = reader.int32(); - break; - } - case 3: { - message.effectiveEnablementState = reader.int32(); - break; - } - case 4: { - if (message.modules === $util.emptyObject) - message.modules = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.modules[key] = value; - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.serviceConfig = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityCenterService message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityCenterService.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityCenterService message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityCenterService.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) - switch (message.intendedEnablementState) { - default: - return "intendedEnablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) - switch (message.effectiveEnablementState) { - default: - return "effectiveEnablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.modules != null && message.hasOwnProperty("modules")) { - if (!$util.isObject(message.modules)) - return "modules: object expected"; - var key = Object.keys(message.modules); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify(message.modules[key[i]]); - if (error) - return "modules." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) { - var error = $root.google.protobuf.Struct.verify(message.serviceConfig); - if (error) - return "serviceConfig." + error; - } - return null; - }; - - /** - * Creates a SecurityCenterService message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService} SecurityCenterService - */ - SecurityCenterService.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SecurityCenterService) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService(); - if (object.name != null) - message.name = String(object.name); - switch (object.intendedEnablementState) { - default: - if (typeof object.intendedEnablementState === "number") { - message.intendedEnablementState = object.intendedEnablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.intendedEnablementState = 0; - break; - case "INHERITED": - case 1: - message.intendedEnablementState = 1; - break; - case "ENABLED": - case 2: - message.intendedEnablementState = 2; - break; - case "DISABLED": - case 3: - message.intendedEnablementState = 3; - break; - case "INGEST_ONLY": - case 4: - message.intendedEnablementState = 4; - break; - } - switch (object.effectiveEnablementState) { - default: - if (typeof object.effectiveEnablementState === "number") { - message.effectiveEnablementState = object.effectiveEnablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.effectiveEnablementState = 0; - break; - case "INHERITED": - case 1: - message.effectiveEnablementState = 1; - break; - case "ENABLED": - case 2: - message.effectiveEnablementState = 2; - break; - case "DISABLED": - case 3: - message.effectiveEnablementState = 3; - break; - case "INGEST_ONLY": - case 4: - message.effectiveEnablementState = 4; - break; - } - if (object.modules) { - if (typeof object.modules !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.modules: object expected"); - message.modules = {}; - for (var keys = Object.keys(object.modules), i = 0; i < keys.length; ++i) { - if (typeof object.modules[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.modules: object expected"); - message.modules[keys[i]] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.fromObject(object.modules[keys[i]]); - } - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.serviceConfig != null) { - if (typeof object.serviceConfig !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityCenterService.serviceConfig: object expected"); - message.serviceConfig = $root.google.protobuf.Struct.fromObject(object.serviceConfig); - } - return message; - }; - - /** - * Creates a plain object from a SecurityCenterService message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} message SecurityCenterService - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityCenterService.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.modules = {}; - if (options.defaults) { - object.name = ""; - object.intendedEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.effectiveEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.updateTime = null; - object.serviceConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) - object.intendedEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] === undefined ? message.intendedEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] : message.intendedEnablementState; - if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) - object.effectiveEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] === undefined ? message.effectiveEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] : message.effectiveEnablementState; - var keys2; - if (message.modules && (keys2 = Object.keys(message.modules)).length) { - object.modules = {}; - for (var j = 0; j < keys2.length; ++j) - object.modules[keys2[j]] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.toObject(message.modules[keys2[j]], options); - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.serviceConfig != null && message.hasOwnProperty("serviceConfig")) - object.serviceConfig = $root.google.protobuf.Struct.toObject(message.serviceConfig, options); - return object; - }; - - /** - * Converts this SecurityCenterService to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @instance - * @returns {Object.} JSON object - */ - SecurityCenterService.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityCenterService - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityCenterService.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SecurityCenterService"; - }; - - SecurityCenterService.ModuleSettings = (function() { - - /** - * Properties of a ModuleSettings. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @interface IModuleSettings - * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [intendedEnablementState] ModuleSettings intendedEnablementState - * @property {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState|null} [effectiveEnablementState] ModuleSettings effectiveEnablementState - */ - - /** - * Constructs a new ModuleSettings. - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService - * @classdesc Represents a ModuleSettings. - * @implements IModuleSettings - * @constructor - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings=} [properties] Properties to set - */ - function ModuleSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleSettings intendedEnablementState. - * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} intendedEnablementState - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @instance - */ - ModuleSettings.prototype.intendedEnablementState = 0; - - /** - * ModuleSettings effectiveEnablementState. - * @member {google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState} effectiveEnablementState - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @instance - */ - ModuleSettings.prototype.effectiveEnablementState = 0; - - /** - * Creates a new ModuleSettings instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings instance - */ - ModuleSettings.create = function create(properties) { - return new ModuleSettings(properties); - }; - - /** - * Encodes the specified ModuleSettings message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings} message ModuleSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.intendedEnablementState != null && Object.hasOwnProperty.call(message, "intendedEnablementState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.intendedEnablementState); - if (message.effectiveEnablementState != null && Object.hasOwnProperty.call(message, "effectiveEnablementState")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.effectiveEnablementState); - return writer; - }; - - /** - * Encodes the specified ModuleSettings message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.IModuleSettings} message ModuleSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.intendedEnablementState = reader.int32(); - break; - } - case 2: { - message.effectiveEnablementState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleSettings message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) - switch (message.intendedEnablementState) { - default: - return "intendedEnablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) - switch (message.effectiveEnablementState) { - default: - return "effectiveEnablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a ModuleSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} ModuleSettings - */ - ModuleSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings(); - switch (object.intendedEnablementState) { - default: - if (typeof object.intendedEnablementState === "number") { - message.intendedEnablementState = object.intendedEnablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.intendedEnablementState = 0; - break; - case "INHERITED": - case 1: - message.intendedEnablementState = 1; - break; - case "ENABLED": - case 2: - message.intendedEnablementState = 2; - break; - case "DISABLED": - case 3: - message.intendedEnablementState = 3; - break; - case "INGEST_ONLY": - case 4: - message.intendedEnablementState = 4; - break; - } - switch (object.effectiveEnablementState) { - default: - if (typeof object.effectiveEnablementState === "number") { - message.effectiveEnablementState = object.effectiveEnablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.effectiveEnablementState = 0; - break; - case "INHERITED": - case 1: - message.effectiveEnablementState = 1; - break; - case "ENABLED": - case 2: - message.effectiveEnablementState = 2; - break; - case "DISABLED": - case 3: - message.effectiveEnablementState = 3; - break; - case "INGEST_ONLY": - case 4: - message.effectiveEnablementState = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a ModuleSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings} message ModuleSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.intendedEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.effectiveEnablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - } - if (message.intendedEnablementState != null && message.hasOwnProperty("intendedEnablementState")) - object.intendedEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] === undefined ? message.intendedEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.intendedEnablementState] : message.intendedEnablementState; - if (message.effectiveEnablementState != null && message.hasOwnProperty("effectiveEnablementState")) - object.effectiveEnablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] === undefined ? message.effectiveEnablementState : $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState[message.effectiveEnablementState] : message.effectiveEnablementState; - return object; - }; - - /** - * Converts this ModuleSettings to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @instance - * @returns {Object.} JSON object - */ - ModuleSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ModuleSettings - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModuleSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SecurityCenterService.ModuleSettings"; - }; - - return ModuleSettings; - })(); - - /** - * EnablementState enum. - * @name google.cloud.securitycentermanagement.v1.SecurityCenterService.EnablementState - * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} INHERITED=1 INHERITED value - * @property {number} ENABLED=2 ENABLED value - * @property {number} DISABLED=3 DISABLED value - * @property {number} INGEST_ONLY=4 INGEST_ONLY value - */ - SecurityCenterService.EnablementState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INHERITED"] = 1; - values[valuesById[2] = "ENABLED"] = 2; - values[valuesById[3] = "DISABLED"] = 3; - values[valuesById[4] = "INGEST_ONLY"] = 4; - return values; - })(); - - return SecurityCenterService; - })(); - - v1.EffectiveSecurityHealthAnalyticsCustomModule = (function() { - - /** - * Properties of an EffectiveSecurityHealthAnalyticsCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IEffectiveSecurityHealthAnalyticsCustomModule - * @property {string|null} [name] EffectiveSecurityHealthAnalyticsCustomModule name - * @property {google.cloud.securitycentermanagement.v1.ICustomConfig|null} [customConfig] EffectiveSecurityHealthAnalyticsCustomModule customConfig - * @property {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] EffectiveSecurityHealthAnalyticsCustomModule enablementState - * @property {string|null} [displayName] EffectiveSecurityHealthAnalyticsCustomModule displayName - */ - - /** - * Constructs a new EffectiveSecurityHealthAnalyticsCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents an EffectiveSecurityHealthAnalyticsCustomModule. - * @implements IEffectiveSecurityHealthAnalyticsCustomModule - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set - */ - function EffectiveSecurityHealthAnalyticsCustomModule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EffectiveSecurityHealthAnalyticsCustomModule name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @instance - */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.name = ""; - - /** - * EffectiveSecurityHealthAnalyticsCustomModule customConfig. - * @member {google.cloud.securitycentermanagement.v1.ICustomConfig|null|undefined} customConfig - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @instance - */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.customConfig = null; - - /** - * EffectiveSecurityHealthAnalyticsCustomModule enablementState. - * @member {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState} enablementState - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @instance - */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; - - /** - * EffectiveSecurityHealthAnalyticsCustomModule displayName. - * @member {string} displayName - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @instance - */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.displayName = ""; - - /** - * Creates a new EffectiveSecurityHealthAnalyticsCustomModule instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule instance - */ - EffectiveSecurityHealthAnalyticsCustomModule.create = function create(properties) { - return new EffectiveSecurityHealthAnalyticsCustomModule(properties); - }; - - /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EffectiveSecurityHealthAnalyticsCustomModule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) - $root.google.cloud.securitycentermanagement.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified EffectiveSecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EffectiveSecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EffectiveSecurityHealthAnalyticsCustomModule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.enablementState = reader.int32(); - break; - } - case 4: { - message.displayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EffectiveSecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EffectiveSecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EffectiveSecurityHealthAnalyticsCustomModule message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EffectiveSecurityHealthAnalyticsCustomModule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) { - var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.verify(message.customConfig); - if (error) - return "customConfig." + error; - } - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - switch (message.enablementState) { - default: - return "enablementState: 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"; - return null; - }; - - /** - * Creates an EffectiveSecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} EffectiveSecurityHealthAnalyticsCustomModule - */ - EffectiveSecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule(); - if (object.name != null) - message.name = String(object.name); - if (object.customConfig != null) { - if (typeof object.customConfig !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.customConfig: object expected"); - message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.fromObject(object.customConfig); - } - switch (object.enablementState) { - default: - if (typeof object.enablementState === "number") { - message.enablementState = object.enablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.enablementState = 0; - break; - case "ENABLED": - case 1: - message.enablementState = 1; - break; - case "DISABLED": - case 2: - message.enablementState = 2; - break; - } - if (object.displayName != null) - message.displayName = String(object.displayName); - return message; - }; - - /** - * Creates a plain object from an EffectiveSecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule} message EffectiveSecurityHealthAnalyticsCustomModule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EffectiveSecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.customConfig = null; - object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) - object.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.toObject(message.customConfig, options); - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this EffectiveSecurityHealthAnalyticsCustomModule to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @instance - * @returns {Object.} JSON object - */ - EffectiveSecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EffectiveSecurityHealthAnalyticsCustomModule - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EffectiveSecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule"; - }; - - /** - * EnablementState enum. - * @name google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.EnablementState - * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - */ - EffectiveSecurityHealthAnalyticsCustomModule.EnablementState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - return values; - })(); - - return EffectiveSecurityHealthAnalyticsCustomModule; - })(); - - v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest = (function() { - - /** - * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @property {string|null} [parent] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent - * @property {number|null} [pageSize] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken - */ - - /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest. - * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - */ - function ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; - - /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; - - /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest instance - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { - return new ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(properties); - }; - - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest} message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest"; - }; - - return ListEffectiveSecurityHealthAnalyticsCustomModulesRequest; - })(); - - v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse = (function() { - - /** - * Properties of a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @property {Array.|null} [effectiveSecurityHealthAnalyticsCustomModules] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules - * @property {string|null} [nextPageToken] ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken - */ - - /** - * Constructs a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse. - * @implements IListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - */ - function ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties) { - this.effectiveSecurityHealthAnalyticsCustomModules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse effectiveSecurityHealthAnalyticsCustomModules. - * @member {Array.} effectiveSecurityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @instance - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.effectiveSecurityHealthAnalyticsCustomModules = $util.emptyArray; - - /** - * ListEffectiveSecurityHealthAnalyticsCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @instance - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse instance - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { - return new ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(properties); - }; - - /** - * Encodes the specified ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.effectiveSecurityHealthAnalyticsCustomModules.length) - for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) - $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.encode(message.effectiveSecurityHealthAnalyticsCustomModules[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 ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length)) - message.effectiveSecurityHealthAnalyticsCustomModules = []; - message.effectiveSecurityHealthAnalyticsCustomModules.push($root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effectiveSecurityHealthAnalyticsCustomModules != null && message.hasOwnProperty("effectiveSecurityHealthAnalyticsCustomModules")) { - if (!Array.isArray(message.effectiveSecurityHealthAnalyticsCustomModules)) - return "effectiveSecurityHealthAnalyticsCustomModules: array expected"; - for (var i = 0; i < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.verify(message.effectiveSecurityHealthAnalyticsCustomModules[i]); - if (error) - return "effectiveSecurityHealthAnalyticsCustomModules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse(); - if (object.effectiveSecurityHealthAnalyticsCustomModules) { - if (!Array.isArray(object.effectiveSecurityHealthAnalyticsCustomModules)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: array expected"); - message.effectiveSecurityHealthAnalyticsCustomModules = []; - for (var i = 0; i < object.effectiveSecurityHealthAnalyticsCustomModules.length; ++i) { - if (typeof object.effectiveSecurityHealthAnalyticsCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.effectiveSecurityHealthAnalyticsCustomModules: object expected"); - message.effectiveSecurityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.fromObject(object.effectiveSecurityHealthAnalyticsCustomModules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEffectiveSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse} message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.effectiveSecurityHealthAnalyticsCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.effectiveSecurityHealthAnalyticsCustomModules && message.effectiveSecurityHealthAnalyticsCustomModules.length) { - object.effectiveSecurityHealthAnalyticsCustomModules = []; - for (var j = 0; j < message.effectiveSecurityHealthAnalyticsCustomModules.length; ++j) - object.effectiveSecurityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule.toObject(message.effectiveSecurityHealthAnalyticsCustomModules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEffectiveSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEffectiveSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse"; - }; - - return ListEffectiveSecurityHealthAnalyticsCustomModulesResponse; - })(); - - v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest = (function() { - - /** - * Properties of a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [name] GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name - */ - - /** - * Constructs a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest. - * @implements IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - */ - function GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEffectiveSecurityHealthAnalyticsCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; - - /** - * Creates a new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest instance - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(properties); - }; - - /** - * Encodes the specified GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { - 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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); - 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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { - if (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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEffectiveSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest} message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.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 GetEffectiveSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest"; - }; - - return GetEffectiveSecurityHealthAnalyticsCustomModuleRequest; - })(); - - v1.SecurityHealthAnalyticsCustomModule = (function() { - - /** - * Properties of a SecurityHealthAnalyticsCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ISecurityHealthAnalyticsCustomModule - * @property {string|null} [name] SecurityHealthAnalyticsCustomModule name - * @property {string|null} [displayName] SecurityHealthAnalyticsCustomModule displayName - * @property {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState|null} [enablementState] SecurityHealthAnalyticsCustomModule enablementState - * @property {google.protobuf.ITimestamp|null} [updateTime] SecurityHealthAnalyticsCustomModule updateTime - * @property {string|null} [lastEditor] SecurityHealthAnalyticsCustomModule lastEditor - * @property {string|null} [ancestorModule] SecurityHealthAnalyticsCustomModule ancestorModule - * @property {google.cloud.securitycentermanagement.v1.ICustomConfig|null} [customConfig] SecurityHealthAnalyticsCustomModule customConfig - */ - - /** - * Constructs a new SecurityHealthAnalyticsCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a SecurityHealthAnalyticsCustomModule. - * @implements ISecurityHealthAnalyticsCustomModule - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set - */ - function SecurityHealthAnalyticsCustomModule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SecurityHealthAnalyticsCustomModule name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - */ - SecurityHealthAnalyticsCustomModule.prototype.name = ""; - - /** - * SecurityHealthAnalyticsCustomModule displayName. - * @member {string} displayName - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - */ - SecurityHealthAnalyticsCustomModule.prototype.displayName = ""; - - /** - * SecurityHealthAnalyticsCustomModule enablementState. - * @member {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState} enablementState - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - */ - SecurityHealthAnalyticsCustomModule.prototype.enablementState = 0; - - /** - * SecurityHealthAnalyticsCustomModule updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - */ - SecurityHealthAnalyticsCustomModule.prototype.updateTime = null; - - /** - * SecurityHealthAnalyticsCustomModule lastEditor. - * @member {string} lastEditor - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - */ - SecurityHealthAnalyticsCustomModule.prototype.lastEditor = ""; - - /** - * SecurityHealthAnalyticsCustomModule ancestorModule. - * @member {string} ancestorModule - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - */ - SecurityHealthAnalyticsCustomModule.prototype.ancestorModule = ""; - - /** - * SecurityHealthAnalyticsCustomModule customConfig. - * @member {google.cloud.securitycentermanagement.v1.ICustomConfig|null|undefined} customConfig - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - */ - SecurityHealthAnalyticsCustomModule.prototype.customConfig = null; - - /** - * Creates a new SecurityHealthAnalyticsCustomModule instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule instance - */ - SecurityHealthAnalyticsCustomModule.create = function create(properties) { - return new SecurityHealthAnalyticsCustomModule(properties); - }; - - /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityHealthAnalyticsCustomModule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastEditor != null && Object.hasOwnProperty.call(message, "lastEditor")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.lastEditor); - if (message.ancestorModule != null && Object.hasOwnProperty.call(message, "ancestorModule")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.ancestorModule); - if (message.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) - $root.google.cloud.securitycentermanagement.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SecurityHealthAnalyticsCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SecurityHealthAnalyticsCustomModule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityHealthAnalyticsCustomModule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.displayName = reader.string(); - break; - } - case 3: { - message.enablementState = reader.int32(); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lastEditor = reader.string(); - break; - } - case 6: { - message.ancestorModule = reader.string(); - break; - } - case 7: { - message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SecurityHealthAnalyticsCustomModule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SecurityHealthAnalyticsCustomModule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SecurityHealthAnalyticsCustomModule message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SecurityHealthAnalyticsCustomModule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - switch (message.enablementState) { - default: - return "enablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) - if (!$util.isString(message.lastEditor)) - return "lastEditor: string expected"; - if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) - if (!$util.isString(message.ancestorModule)) - return "ancestorModule: string expected"; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) { - var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.verify(message.customConfig); - if (error) - return "customConfig." + error; - } - return null; - }; - - /** - * Creates a SecurityHealthAnalyticsCustomModule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} SecurityHealthAnalyticsCustomModule - */ - SecurityHealthAnalyticsCustomModule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.enablementState) { - default: - if (typeof object.enablementState === "number") { - message.enablementState = object.enablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.enablementState = 0; - break; - case "ENABLED": - case 1: - message.enablementState = 1; - break; - case "DISABLED": - case 2: - message.enablementState = 2; - break; - case "INHERITED": - case 3: - message.enablementState = 3; - break; - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastEditor != null) - message.lastEditor = String(object.lastEditor); - if (object.ancestorModule != null) - message.ancestorModule = String(object.ancestorModule); - if (object.customConfig != null) { - if (typeof object.customConfig !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.customConfig: object expected"); - message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.fromObject(object.customConfig); - } - return message; - }; - - /** - * Creates a plain object from a SecurityHealthAnalyticsCustomModule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} message SecurityHealthAnalyticsCustomModule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SecurityHealthAnalyticsCustomModule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.updateTime = null; - object.lastEditor = ""; - object.ancestorModule = ""; - object.customConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState[message.enablementState] : message.enablementState; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) - object.lastEditor = message.lastEditor; - if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) - object.ancestorModule = message.ancestorModule; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) - object.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.toObject(message.customConfig, options); - return object; - }; - - /** - * Converts this SecurityHealthAnalyticsCustomModule to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @instance - * @returns {Object.} JSON object - */ - SecurityHealthAnalyticsCustomModule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SecurityHealthAnalyticsCustomModule - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SecurityHealthAnalyticsCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule"; - }; - - /** - * EnablementState enum. - * @name google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.EnablementState - * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - * @property {number} INHERITED=3 INHERITED value - */ - SecurityHealthAnalyticsCustomModule.EnablementState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - values[valuesById[3] = "INHERITED"] = 3; - return values; - })(); - - return SecurityHealthAnalyticsCustomModule; - })(); - - v1.CustomConfig = (function() { - - /** - * Properties of a CustomConfig. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ICustomConfig - * @property {google.type.IExpr|null} [predicate] CustomConfig predicate - * @property {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null} [customOutput] CustomConfig customOutput - * @property {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null} [resourceSelector] CustomConfig resourceSelector - * @property {google.cloud.securitycentermanagement.v1.CustomConfig.Severity|null} [severity] CustomConfig severity - * @property {string|null} [description] CustomConfig description - * @property {string|null} [recommendation] CustomConfig recommendation - */ - - /** - * Constructs a new CustomConfig. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a CustomConfig. - * @implements ICustomConfig - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ICustomConfig=} [properties] Properties to set - */ - function CustomConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomConfig predicate. - * @member {google.type.IExpr|null|undefined} predicate - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.predicate = null; - - /** - * CustomConfig customOutput. - * @member {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec|null|undefined} customOutput - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.customOutput = null; - - /** - * CustomConfig resourceSelector. - * @member {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector|null|undefined} resourceSelector - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.resourceSelector = null; - - /** - * CustomConfig severity. - * @member {google.cloud.securitycentermanagement.v1.CustomConfig.Severity} severity - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.severity = 0; - - /** - * CustomConfig description. - * @member {string} description - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.description = ""; - - /** - * CustomConfig recommendation. - * @member {string} recommendation - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @instance - */ - CustomConfig.prototype.recommendation = ""; - - /** - * Creates a new CustomConfig instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {google.cloud.securitycentermanagement.v1.ICustomConfig=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig instance - */ - CustomConfig.create = function create(properties) { - return new CustomConfig(properties); - }; - - /** - * Encodes the specified CustomConfig message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {google.cloud.securitycentermanagement.v1.ICustomConfig} message CustomConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.predicate != null && Object.hasOwnProperty.call(message, "predicate")) - $root.google.type.Expr.encode(message.predicate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.customOutput != null && Object.hasOwnProperty.call(message, "customOutput")) - $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.encode(message.customOutput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resourceSelector != null && Object.hasOwnProperty.call(message, "resourceSelector")) - $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.encode(message.resourceSelector, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.severity); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); - if (message.recommendation != null && Object.hasOwnProperty.call(message, "recommendation")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.recommendation); - return writer; - }; - - /** - * Encodes the specified CustomConfig message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {google.cloud.securitycentermanagement.v1.ICustomConfig} message CustomConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.predicate = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - case 2: { - message.customOutput = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resourceSelector = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.decode(reader, reader.uint32()); - break; - } - case 4: { - message.severity = reader.int32(); - break; - } - case 5: { - message.description = reader.string(); - break; - } - case 6: { - message.recommendation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomConfig message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.predicate != null && message.hasOwnProperty("predicate")) { - var error = $root.google.type.Expr.verify(message.predicate); - if (error) - return "predicate." + error; - } - if (message.customOutput != null && message.hasOwnProperty("customOutput")) { - var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify(message.customOutput); - if (error) - return "customOutput." + error; - } - if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) { - var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify(message.resourceSelector); - if (error) - return "resourceSelector." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.recommendation != null && message.hasOwnProperty("recommendation")) - if (!$util.isString(message.recommendation)) - return "recommendation: string expected"; - return null; - }; - - /** - * Creates a CustomConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig} CustomConfig - */ - CustomConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig(); - if (object.predicate != null) { - if (typeof object.predicate !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.predicate: object expected"); - message.predicate = $root.google.type.Expr.fromObject(object.predicate); - } - if (object.customOutput != null) { - if (typeof object.customOutput !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.customOutput: object expected"); - message.customOutput = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.fromObject(object.customOutput); - } - if (object.resourceSelector != null) { - if (typeof object.resourceSelector !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.resourceSelector: object expected"); - message.resourceSelector = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.fromObject(object.resourceSelector); - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "CRITICAL": - case 1: - message.severity = 1; - break; - case "HIGH": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "LOW": - case 4: - message.severity = 4; - break; - } - if (object.description != null) - message.description = String(object.description); - if (object.recommendation != null) - message.recommendation = String(object.recommendation); - return message; - }; - - /** - * Creates a plain object from a CustomConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig} message CustomConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.predicate = null; - object.customOutput = null; - object.resourceSelector = null; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.description = ""; - object.recommendation = ""; - } - if (message.predicate != null && message.hasOwnProperty("predicate")) - object.predicate = $root.google.type.Expr.toObject(message.predicate, options); - if (message.customOutput != null && message.hasOwnProperty("customOutput")) - object.customOutput = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.toObject(message.customOutput, options); - if (message.resourceSelector != null && message.hasOwnProperty("resourceSelector")) - object.resourceSelector = $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.toObject(message.resourceSelector, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.CustomConfig.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycentermanagement.v1.CustomConfig.Severity[message.severity] : message.severity; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.recommendation != null && message.hasOwnProperty("recommendation")) - object.recommendation = message.recommendation; - return object; - }; - - /** - * Converts this CustomConfig to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @instance - * @returns {Object.} JSON object - */ - CustomConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomConfig - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig"; - }; - - CustomConfig.CustomOutputSpec = (function() { - - /** - * Properties of a CustomOutputSpec. - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @interface ICustomOutputSpec - * @property {Array.|null} [properties] CustomOutputSpec properties - */ - - /** - * Constructs a new CustomOutputSpec. - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @classdesc Represents a CustomOutputSpec. - * @implements ICustomOutputSpec - * @constructor - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set - */ - function CustomOutputSpec(properties) { - this.properties = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomOutputSpec properties. - * @member {Array.} properties - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @instance - */ - CustomOutputSpec.prototype.properties = $util.emptyArray; - - /** - * Creates a new CustomOutputSpec instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec instance - */ - CustomOutputSpec.create = function create(properties) { - return new CustomOutputSpec(properties); - }; - - /** - * Encodes the specified CustomOutputSpec message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomOutputSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.properties != null && message.properties.length) - for (var i = 0; i < message.properties.length; ++i) - $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.encode(message.properties[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CustomOutputSpec message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ICustomOutputSpec} message CustomOutputSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomOutputSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomOutputSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.properties && message.properties.length)) - message.properties = []; - message.properties.push($root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomOutputSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomOutputSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomOutputSpec message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomOutputSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.properties != null && message.hasOwnProperty("properties")) { - if (!Array.isArray(message.properties)) - return "properties: array expected"; - for (var i = 0; i < message.properties.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify(message.properties[i]); - if (error) - return "properties." + error; - } - } - return null; - }; - - /** - * Creates a CustomOutputSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} CustomOutputSpec - */ - CustomOutputSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec(); - if (object.properties) { - if (!Array.isArray(object.properties)) - throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.properties: array expected"); - message.properties = []; - for (var i = 0; i < object.properties.length; ++i) { - if (typeof object.properties[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.properties: object expected"); - message.properties[i] = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.fromObject(object.properties[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CustomOutputSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec} message CustomOutputSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomOutputSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.properties = []; - if (message.properties && message.properties.length) { - object.properties = []; - for (var j = 0; j < message.properties.length; ++j) - object.properties[j] = $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.toObject(message.properties[j], options); - } - return object; - }; - - /** - * Converts this CustomOutputSpec to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @instance - * @returns {Object.} JSON object - */ - CustomOutputSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomOutputSpec - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomOutputSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec"; - }; - - CustomOutputSpec.Property = (function() { - - /** - * Properties of a Property. - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @interface IProperty - * @property {string|null} [name] Property name - * @property {google.type.IExpr|null} [valueExpression] Property valueExpression - */ - - /** - * Constructs a new Property. - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec - * @classdesc Represents a Property. - * @implements IProperty - * @constructor - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set - */ - function Property(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Property name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @instance - */ - Property.prototype.name = ""; - - /** - * Property valueExpression. - * @member {google.type.IExpr|null|undefined} valueExpression - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @instance - */ - Property.prototype.valueExpression = null; - - /** - * Creates a new Property instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property instance - */ - Property.create = function create(properties) { - return new Property(properties); - }; - - /** - * Encodes the specified Property message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Property.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.valueExpression != null && Object.hasOwnProperty.call(message, "valueExpression")) - $root.google.type.Expr.encode(message.valueExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.IProperty} message Property message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Property.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Property message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Property.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.valueExpression = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Property message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Property.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Property message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Property.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.valueExpression != null && message.hasOwnProperty("valueExpression")) { - var error = $root.google.type.Expr.verify(message.valueExpression); - if (error) - return "valueExpression." + error; - } - return null; - }; - - /** - * Creates a Property message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} Property - */ - Property.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property(); - if (object.name != null) - message.name = String(object.name); - if (object.valueExpression != null) { - if (typeof object.valueExpression !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property.valueExpression: object expected"); - message.valueExpression = $root.google.type.Expr.fromObject(object.valueExpression); - } - return message; - }; - - /** - * Creates a plain object from a Property message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property} message Property - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Property.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.valueExpression = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.valueExpression != null && message.hasOwnProperty("valueExpression")) - object.valueExpression = $root.google.type.Expr.toObject(message.valueExpression, options); - return object; - }; - - /** - * Converts this Property to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @instance - * @returns {Object.} JSON object - */ - Property.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Property - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig.CustomOutputSpec.Property"; - }; - - return Property; - })(); - - return CustomOutputSpec; - })(); - - CustomConfig.ResourceSelector = (function() { - - /** - * Properties of a ResourceSelector. - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @interface IResourceSelector - * @property {Array.|null} [resourceTypes] ResourceSelector resourceTypes - */ - - /** - * Constructs a new ResourceSelector. - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig - * @classdesc Represents a ResourceSelector. - * @implements IResourceSelector - * @constructor - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector=} [properties] Properties to set - */ - function ResourceSelector(properties) { - this.resourceTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceSelector resourceTypes. - * @member {Array.} resourceTypes - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @instance - */ - ResourceSelector.prototype.resourceTypes = $util.emptyArray; - - /** - * Creates a new ResourceSelector instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector instance - */ - ResourceSelector.create = function create(properties) { - return new ResourceSelector(properties); - }; - - /** - * Encodes the specified ResourceSelector message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSelector.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceTypes != null && message.resourceTypes.length) - for (var i = 0; i < message.resourceTypes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceTypes[i]); - return writer; - }; - - /** - * Encodes the specified ResourceSelector message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.IResourceSelector} message ResourceSelector message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSelector.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSelector.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceTypes && message.resourceTypes.length)) - message.resourceTypes = []; - message.resourceTypes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceSelector message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSelector.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceSelector message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceSelector.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceTypes != null && message.hasOwnProperty("resourceTypes")) { - if (!Array.isArray(message.resourceTypes)) - return "resourceTypes: array expected"; - for (var i = 0; i < message.resourceTypes.length; ++i) - if (!$util.isString(message.resourceTypes[i])) - return "resourceTypes: string[] expected"; - } - return null; - }; - - /** - * Creates a ResourceSelector message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} ResourceSelector - */ - ResourceSelector.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector(); - if (object.resourceTypes) { - if (!Array.isArray(object.resourceTypes)) - throw TypeError(".google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector.resourceTypes: array expected"); - message.resourceTypes = []; - for (var i = 0; i < object.resourceTypes.length; ++i) - message.resourceTypes[i] = String(object.resourceTypes[i]); - } - return message; - }; - - /** - * Creates a plain object from a ResourceSelector message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector} message ResourceSelector - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceSelector.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceTypes = []; - if (message.resourceTypes && message.resourceTypes.length) { - object.resourceTypes = []; - for (var j = 0; j < message.resourceTypes.length; ++j) - object.resourceTypes[j] = message.resourceTypes[j]; - } - return object; - }; - - /** - * Converts this ResourceSelector to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @instance - * @returns {Object.} JSON object - */ - ResourceSelector.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceSelector - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CustomConfig.ResourceSelector"; - }; - - return ResourceSelector; - })(); - - /** - * Severity enum. - * @name google.cloud.securitycentermanagement.v1.CustomConfig.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} HIGH=2 HIGH value - * @property {number} MEDIUM=3 MEDIUM value - * @property {number} LOW=4 LOW value - */ - CustomConfig.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "HIGH"] = 2; - values[valuesById[3] = "MEDIUM"] = 3; - values[valuesById[4] = "LOW"] = 4; - return values; - })(); - - return CustomConfig; - })(); - - v1.ListSecurityHealthAnalyticsCustomModulesRequest = (function() { - - /** - * Properties of a ListSecurityHealthAnalyticsCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListSecurityHealthAnalyticsCustomModulesRequest - * @property {string|null} [parent] ListSecurityHealthAnalyticsCustomModulesRequest parent - * @property {number|null} [pageSize] ListSecurityHealthAnalyticsCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListSecurityHealthAnalyticsCustomModulesRequest pageToken - */ - - /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesRequest. - * @implements IListSecurityHealthAnalyticsCustomModulesRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - */ - function ListSecurityHealthAnalyticsCustomModulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSecurityHealthAnalyticsCustomModulesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; - - /** - * ListSecurityHealthAnalyticsCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; - - /** - * ListSecurityHealthAnalyticsCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest instance - */ - ListSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { - return new ListSecurityHealthAnalyticsCustomModulesRequest(properties); - }; - - /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} ListSecurityHealthAnalyticsCustomModulesRequest - */ - ListSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest} message ListSecurityHealthAnalyticsCustomModulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListSecurityHealthAnalyticsCustomModulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest"; - }; - - return ListSecurityHealthAnalyticsCustomModulesRequest; - })(); - - v1.ListSecurityHealthAnalyticsCustomModulesResponse = (function() { - - /** - * Properties of a ListSecurityHealthAnalyticsCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListSecurityHealthAnalyticsCustomModulesResponse - * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules - * @property {string|null} [nextPageToken] ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken - */ - - /** - * Constructs a new ListSecurityHealthAnalyticsCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListSecurityHealthAnalyticsCustomModulesResponse. - * @implements IListSecurityHealthAnalyticsCustomModulesResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - */ - function ListSecurityHealthAnalyticsCustomModulesResponse(properties) { - this.securityHealthAnalyticsCustomModules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. - * @member {Array.} securityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @instance - */ - ListSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; - - /** - * ListSecurityHealthAnalyticsCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @instance - */ - ListSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse instance - */ - ListSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { - return new ListSecurityHealthAnalyticsCustomModulesResponse(properties); - }; - - /** - * Encodes the specified ListSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) - $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[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 ListSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) - message.securityHealthAnalyticsCustomModules = []; - message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSecurityHealthAnalyticsCustomModulesResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { - if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) - return "securityHealthAnalyticsCustomModules: array expected"; - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); - if (error) - return "securityHealthAnalyticsCustomModules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} ListSecurityHealthAnalyticsCustomModulesResponse - */ - ListSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse(); - if (object.securityHealthAnalyticsCustomModules) { - if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); - message.securityHealthAnalyticsCustomModules = []; - for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { - if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); - message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse} message ListSecurityHealthAnalyticsCustomModulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.securityHealthAnalyticsCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { - object.securityHealthAnalyticsCustomModules = []; - for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) - object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSecurityHealthAnalyticsCustomModulesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse"; - }; - - return ListSecurityHealthAnalyticsCustomModulesResponse; - })(); - - v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest = (function() { - - /** - * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @property {string|null} [parent] ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent - * @property {number|null} [pageSize] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken - */ - - /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesRequest. - * @implements IListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - */ - function ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDescendantSecurityHealthAnalyticsCustomModulesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.parent = ""; - - /** - * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageSize = 0; - - /** - * ListDescendantSecurityHealthAnalyticsCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @instance - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest instance - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.create = function create(properties) { - return new ListDescendantSecurityHealthAnalyticsCustomModulesRequest(properties); - }; - - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} ListDescendantSecurityHealthAnalyticsCustomModulesRequest - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest} message ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDescendantSecurityHealthAnalyticsCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest"; - }; - - return ListDescendantSecurityHealthAnalyticsCustomModulesRequest; - })(); - - v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse = (function() { - - /** - * Properties of a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @property {Array.|null} [securityHealthAnalyticsCustomModules] ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules - * @property {string|null} [nextPageToken] ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken - */ - - /** - * Constructs a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListDescendantSecurityHealthAnalyticsCustomModulesResponse. - * @implements IListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - */ - function ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties) { - this.securityHealthAnalyticsCustomModules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDescendantSecurityHealthAnalyticsCustomModulesResponse securityHealthAnalyticsCustomModules. - * @member {Array.} securityHealthAnalyticsCustomModules - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @instance - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.securityHealthAnalyticsCustomModules = $util.emptyArray; - - /** - * ListDescendantSecurityHealthAnalyticsCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @instance - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse instance - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.create = function create(properties) { - return new ListDescendantSecurityHealthAnalyticsCustomModulesResponse(properties); - }; - - /** - * Encodes the specified ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securityHealthAnalyticsCustomModules != null && message.securityHealthAnalyticsCustomModules.length) - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) - $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModules[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 ListDescendantSecurityHealthAnalyticsCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length)) - message.securityHealthAnalyticsCustomModules = []; - message.securityHealthAnalyticsCustomModules.push($root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securityHealthAnalyticsCustomModules != null && message.hasOwnProperty("securityHealthAnalyticsCustomModules")) { - if (!Array.isArray(message.securityHealthAnalyticsCustomModules)) - return "securityHealthAnalyticsCustomModules: array expected"; - for (var i = 0; i < message.securityHealthAnalyticsCustomModules.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModules[i]); - if (error) - return "securityHealthAnalyticsCustomModules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} ListDescendantSecurityHealthAnalyticsCustomModulesResponse - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse(); - if (object.securityHealthAnalyticsCustomModules) { - if (!Array.isArray(object.securityHealthAnalyticsCustomModules)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: array expected"); - message.securityHealthAnalyticsCustomModules = []; - for (var i = 0; i < object.securityHealthAnalyticsCustomModules.length; ++i) { - if (typeof object.securityHealthAnalyticsCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse.securityHealthAnalyticsCustomModules: object expected"); - message.securityHealthAnalyticsCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListDescendantSecurityHealthAnalyticsCustomModulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse} message ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.securityHealthAnalyticsCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.securityHealthAnalyticsCustomModules && message.securityHealthAnalyticsCustomModules.length) { - object.securityHealthAnalyticsCustomModules = []; - for (var j = 0; j < message.securityHealthAnalyticsCustomModules.length; ++j) - object.securityHealthAnalyticsCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListDescendantSecurityHealthAnalyticsCustomModulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDescendantSecurityHealthAnalyticsCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse"; - }; - - return ListDescendantSecurityHealthAnalyticsCustomModulesResponse; - })(); - - v1.GetSecurityHealthAnalyticsCustomModuleRequest = (function() { - - /** - * Properties of a GetSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IGetSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [name] GetSecurityHealthAnalyticsCustomModuleRequest name - */ - - /** - * Constructs a new GetSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a GetSecurityHealthAnalyticsCustomModuleRequest. - * @implements IGetSecurityHealthAnalyticsCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - */ - function GetSecurityHealthAnalyticsCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSecurityHealthAnalyticsCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - GetSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; - - /** - * Creates a new GetSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest instance - */ - GetSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new GetSecurityHealthAnalyticsCustomModuleRequest(properties); - }; - - /** - * Encodes the specified GetSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { - 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 GetSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); - 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 GetSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSecurityHealthAnalyticsCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { - if (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 GetSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} GetSecurityHealthAnalyticsCustomModuleRequest - */ - GetSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest} message GetSecurityHealthAnalyticsCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSecurityHealthAnalyticsCustomModuleRequest.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 GetSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - GetSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetSecurityHealthAnalyticsCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest"; - }; - - return GetSecurityHealthAnalyticsCustomModuleRequest; - })(); - - v1.CreateSecurityHealthAnalyticsCustomModuleRequest = (function() { - - /** - * Properties of a CreateSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ICreateSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [parent] CreateSecurityHealthAnalyticsCustomModuleRequest parent - * @property {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule - * @property {boolean|null} [validateOnly] CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly - */ - - /** - * Constructs a new CreateSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a CreateSecurityHealthAnalyticsCustomModuleRequest. - * @implements ICreateSecurityHealthAnalyticsCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - */ - function CreateSecurityHealthAnalyticsCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateSecurityHealthAnalyticsCustomModuleRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; - - /** - * CreateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. - * @member {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; - - /** - * CreateSecurityHealthAnalyticsCustomModuleRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest instance - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new CreateSecurityHealthAnalyticsCustomModuleRequest(properties); - }; - - /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) - $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateSecurityHealthAnalyticsCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { - var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); - if (error) - return "securityHealthAnalyticsCustomModule." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} CreateSecurityHealthAnalyticsCustomModuleRequest - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.securityHealthAnalyticsCustomModule != null) { - if (typeof object.securityHealthAnalyticsCustomModule !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); - message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest} message CreateSecurityHealthAnalyticsCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.securityHealthAnalyticsCustomModule = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) - object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateSecurityHealthAnalyticsCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest"; - }; - - return CreateSecurityHealthAnalyticsCustomModuleRequest; - })(); - - v1.UpdateSecurityHealthAnalyticsCustomModuleRequest = (function() { - - /** - * Properties of an UpdateSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IUpdateSecurityHealthAnalyticsCustomModuleRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask - * @property {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null} [securityHealthAnalyticsCustomModule] UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule - * @property {boolean|null} [validateOnly] UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly - */ - - /** - * Constructs a new UpdateSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents an UpdateSecurityHealthAnalyticsCustomModuleRequest. - * @implements IUpdateSecurityHealthAnalyticsCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - */ - function UpdateSecurityHealthAnalyticsCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateSecurityHealthAnalyticsCustomModuleRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.updateMask = null; - - /** - * UpdateSecurityHealthAnalyticsCustomModuleRequest securityHealthAnalyticsCustomModule. - * @member {google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null|undefined} securityHealthAnalyticsCustomModule - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.securityHealthAnalyticsCustomModule = null; - - /** - * UpdateSecurityHealthAnalyticsCustomModuleRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest instance - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new UpdateSecurityHealthAnalyticsCustomModuleRequest(properties); - }; - - /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && Object.hasOwnProperty.call(message, "securityHealthAnalyticsCustomModule")) - $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.encode(message.securityHealthAnalyticsCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); - 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.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateSecurityHealthAnalyticsCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.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.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) { - var error = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.verify(message.securityHealthAnalyticsCustomModule); - if (error) - return "securityHealthAnalyticsCustomModule." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} UpdateSecurityHealthAnalyticsCustomModuleRequest - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.securityHealthAnalyticsCustomModule != null) { - if (typeof object.securityHealthAnalyticsCustomModule !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest.securityHealthAnalyticsCustomModule: object expected"); - message.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.fromObject(object.securityHealthAnalyticsCustomModule); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest} message UpdateSecurityHealthAnalyticsCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.securityHealthAnalyticsCustomModule = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.securityHealthAnalyticsCustomModule != null && message.hasOwnProperty("securityHealthAnalyticsCustomModule")) - object.securityHealthAnalyticsCustomModule = $root.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule.toObject(message.securityHealthAnalyticsCustomModule, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateSecurityHealthAnalyticsCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest"; - }; - - return UpdateSecurityHealthAnalyticsCustomModuleRequest; - })(); - - v1.DeleteSecurityHealthAnalyticsCustomModuleRequest = (function() { - - /** - * Properties of a DeleteSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IDeleteSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [name] DeleteSecurityHealthAnalyticsCustomModuleRequest name - * @property {boolean|null} [validateOnly] DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly - */ - - /** - * Constructs a new DeleteSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a DeleteSecurityHealthAnalyticsCustomModuleRequest. - * @implements IDeleteSecurityHealthAnalyticsCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - */ - function DeleteSecurityHealthAnalyticsCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteSecurityHealthAnalyticsCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.name = ""; - - /** - * DeleteSecurityHealthAnalyticsCustomModuleRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.validateOnly = false; - - /** - * Creates a new DeleteSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest instance - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new DeleteSecurityHealthAnalyticsCustomModuleRequest(properties); - }; - - /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified DeleteSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteSecurityHealthAnalyticsCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a DeleteSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} DeleteSecurityHealthAnalyticsCustomModuleRequest - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a DeleteSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest} message DeleteSecurityHealthAnalyticsCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.validateOnly = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this DeleteSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteSecurityHealthAnalyticsCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest"; - }; - - return DeleteSecurityHealthAnalyticsCustomModuleRequest; - })(); - - v1.SimulateSecurityHealthAnalyticsCustomModuleRequest = (function() { - - /** - * Properties of a SimulateSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ISimulateSecurityHealthAnalyticsCustomModuleRequest - * @property {string|null} [parent] SimulateSecurityHealthAnalyticsCustomModuleRequest parent - * @property {google.cloud.securitycentermanagement.v1.ICustomConfig|null} [customConfig] SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig - * @property {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null} [resource] SimulateSecurityHealthAnalyticsCustomModuleRequest resource - */ - - /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleRequest. - * @implements ISimulateSecurityHealthAnalyticsCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - */ - function SimulateSecurityHealthAnalyticsCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimulateSecurityHealthAnalyticsCustomModuleRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.parent = ""; - - /** - * SimulateSecurityHealthAnalyticsCustomModuleRequest customConfig. - * @member {google.cloud.securitycentermanagement.v1.ICustomConfig|null|undefined} customConfig - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.customConfig = null; - - /** - * SimulateSecurityHealthAnalyticsCustomModuleRequest resource. - * @member {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource|null|undefined} resource - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @instance - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.resource = null; - - /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest instance - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.create = function create(properties) { - return new SimulateSecurityHealthAnalyticsCustomModuleRequest(properties); - }; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.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.customConfig != null && Object.hasOwnProperty.call(message, "customConfig")) - $root.google.cloud.securitycentermanagement.v1.CustomConfig.encode(message.customConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resource = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.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.customConfig != null && message.hasOwnProperty("customConfig")) { - var error = $root.google.cloud.securitycentermanagement.v1.CustomConfig.verify(message.customConfig); - if (error) - return "customConfig." + error; - } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates a SimulateSecurityHealthAnalyticsCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} SimulateSecurityHealthAnalyticsCustomModuleRequest - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.customConfig != null) { - if (typeof object.customConfig !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.customConfig: object expected"); - message.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.fromObject(object.customConfig); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.resource: object expected"); - message.resource = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest} message SimulateSecurityHealthAnalyticsCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.customConfig = null; - object.resource = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.customConfig != null && message.hasOwnProperty("customConfig")) - object.customConfig = $root.google.cloud.securitycentermanagement.v1.CustomConfig.toObject(message.customConfig, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.toObject(message.resource, options); - return object; - }; - - /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimulateSecurityHealthAnalyticsCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest"; - }; - - SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource = (function() { - - /** - * Properties of a SimulatedResource. - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @interface ISimulatedResource - * @property {string|null} [resourceType] SimulatedResource resourceType - * @property {google.protobuf.IStruct|null} [resourceData] SimulatedResource resourceData - * @property {google.iam.v1.IPolicy|null} [iamPolicyData] SimulatedResource iamPolicyData - */ - - /** - * Constructs a new SimulatedResource. - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest - * @classdesc Represents a SimulatedResource. - * @implements ISimulatedResource - * @constructor - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set - */ - function SimulatedResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimulatedResource resourceType. - * @member {string} resourceType - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - */ - SimulatedResource.prototype.resourceType = ""; - - /** - * SimulatedResource resourceData. - * @member {google.protobuf.IStruct|null|undefined} resourceData - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - */ - SimulatedResource.prototype.resourceData = null; - - /** - * SimulatedResource iamPolicyData. - * @member {google.iam.v1.IPolicy|null|undefined} iamPolicyData - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - */ - SimulatedResource.prototype.iamPolicyData = null; - - /** - * Creates a new SimulatedResource instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource instance - */ - SimulatedResource.create = function create(properties) { - return new SimulatedResource(properties); - }; - - /** - * Encodes the specified SimulatedResource message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); - if (message.resourceData != null && Object.hasOwnProperty.call(message, "resourceData")) - $root.google.protobuf.Struct.encode(message.resourceData, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.iamPolicyData != null && Object.hasOwnProperty.call(message, "iamPolicyData")) - $root.google.iam.v1.Policy.encode(message.iamPolicyData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SimulatedResource message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.ISimulatedResource} message SimulatedResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimulatedResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.string(); - break; - } - case 2: { - message.resourceData = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.iamPolicyData = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimulatedResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulatedResource message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulatedResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resourceData != null && message.hasOwnProperty("resourceData")) { - var error = $root.google.protobuf.Struct.verify(message.resourceData); - if (error) - return "resourceData." + error; - } - if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) { - var error = $root.google.iam.v1.Policy.verify(message.iamPolicyData); - if (error) - return "iamPolicyData." + error; - } - return null; - }; - - /** - * Creates a SimulatedResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} SimulatedResource - */ - SimulatedResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource(); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resourceData != null) { - if (typeof object.resourceData !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.resourceData: object expected"); - message.resourceData = $root.google.protobuf.Struct.fromObject(object.resourceData); - } - if (object.iamPolicyData != null) { - if (typeof object.iamPolicyData !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.iamPolicyData: object expected"); - message.iamPolicyData = $root.google.iam.v1.Policy.fromObject(object.iamPolicyData); - } - return message; - }; - - /** - * Creates a plain object from a SimulatedResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} message SimulatedResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulatedResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = ""; - object.resourceData = null; - object.iamPolicyData = null; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resourceData != null && message.hasOwnProperty("resourceData")) - object.resourceData = $root.google.protobuf.Struct.toObject(message.resourceData, options); - if (message.iamPolicyData != null && message.hasOwnProperty("iamPolicyData")) - object.iamPolicyData = $root.google.iam.v1.Policy.toObject(message.iamPolicyData, options); - return object; - }; - - /** - * Converts this SimulatedResource to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @instance - * @returns {Object.} JSON object - */ - SimulatedResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SimulatedResource - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimulatedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource"; - }; - - return SimulatedResource; - })(); - - return SimulateSecurityHealthAnalyticsCustomModuleRequest; - })(); - - v1.SimulatedFinding = (function() { - - /** - * Properties of a SimulatedFinding. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ISimulatedFinding - * @property {string|null} [name] SimulatedFinding name - * @property {string|null} [parent] SimulatedFinding parent - * @property {string|null} [resourceName] SimulatedFinding resourceName - * @property {string|null} [category] SimulatedFinding category - * @property {google.cloud.securitycentermanagement.v1.SimulatedFinding.State|null} [state] SimulatedFinding state - * @property {Object.|null} [sourceProperties] SimulatedFinding sourceProperties - * @property {google.protobuf.ITimestamp|null} [eventTime] SimulatedFinding eventTime - * @property {google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity|null} [severity] SimulatedFinding severity - * @property {google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass|null} [findingClass] SimulatedFinding findingClass - */ - - /** - * Constructs a new SimulatedFinding. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a SimulatedFinding. - * @implements ISimulatedFinding - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding=} [properties] Properties to set - */ - function SimulatedFinding(properties) { - this.sourceProperties = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimulatedFinding name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.name = ""; - - /** - * SimulatedFinding parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.parent = ""; - - /** - * SimulatedFinding resourceName. - * @member {string} resourceName - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.resourceName = ""; - - /** - * SimulatedFinding category. - * @member {string} category - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.category = ""; - - /** - * SimulatedFinding state. - * @member {google.cloud.securitycentermanagement.v1.SimulatedFinding.State} state - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.state = 0; - - /** - * SimulatedFinding sourceProperties. - * @member {Object.} sourceProperties - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.sourceProperties = $util.emptyObject; - - /** - * SimulatedFinding eventTime. - * @member {google.protobuf.ITimestamp|null|undefined} eventTime - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.eventTime = null; - - /** - * SimulatedFinding severity. - * @member {google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity} severity - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.severity = 0; - - /** - * SimulatedFinding findingClass. - * @member {google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass} findingClass - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - */ - SimulatedFinding.prototype.findingClass = 0; - - /** - * Creates a new SimulatedFinding instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding instance - */ - SimulatedFinding.create = function create(properties) { - return new SimulatedFinding(properties); - }; - - /** - * Encodes the specified SimulatedFinding message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding} message SimulatedFinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedFinding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); - if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); - if (message.category != null && Object.hasOwnProperty.call(message, "category")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.category); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.sourceProperties != null && Object.hasOwnProperty.call(message, "sourceProperties")) - for (var keys = Object.keys(message.sourceProperties), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.sourceProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.eventTime != null && Object.hasOwnProperty.call(message, "eventTime")) - $root.google.protobuf.Timestamp.encode(message.eventTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.severity); - if (message.findingClass != null && Object.hasOwnProperty.call(message, "findingClass")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.findingClass); - return writer; - }; - - /** - * Encodes the specified SimulatedFinding message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulatedFinding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulatedFinding} message SimulatedFinding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedFinding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimulatedFinding message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedFinding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulatedFinding(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.parent = reader.string(); - break; - } - case 3: { - message.resourceName = reader.string(); - break; - } - case 4: { - message.category = reader.string(); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - if (message.sourceProperties === $util.emptyObject) - message.sourceProperties = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.sourceProperties[key] = value; - break; - } - case 7: { - message.eventTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.severity = reader.int32(); - break; - } - case 9: { - message.findingClass = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimulatedFinding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedFinding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulatedFinding message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulatedFinding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.category != null && message.hasOwnProperty("category")) - if (!$util.isString(message.category)) - return "category: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sourceProperties != null && message.hasOwnProperty("sourceProperties")) { - if (!$util.isObject(message.sourceProperties)) - return "sourceProperties: object expected"; - var key = Object.keys(message.sourceProperties); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.sourceProperties[key[i]]); - if (error) - return "sourceProperties." + error; - } - } - if (message.eventTime != null && message.hasOwnProperty("eventTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.eventTime); - if (error) - return "eventTime." + error; - } - if (message.severity != null && message.hasOwnProperty("severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - switch (message.findingClass) { - default: - return "findingClass: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - return null; - }; - - /** - * Creates a SimulatedFinding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SimulatedFinding} SimulatedFinding - */ - SimulatedFinding.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulatedFinding) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SimulatedFinding(); - if (object.name != null) - message.name = String(object.name); - if (object.parent != null) - message.parent = String(object.parent); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - if (object.category != null) - message.category = String(object.category); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "INACTIVE": - case 2: - message.state = 2; - break; - } - if (object.sourceProperties) { - if (typeof object.sourceProperties !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulatedFinding.sourceProperties: object expected"); - message.sourceProperties = {}; - for (var keys = Object.keys(object.sourceProperties), i = 0; i < keys.length; ++i) { - if (typeof object.sourceProperties[keys[i]] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulatedFinding.sourceProperties: object expected"); - message.sourceProperties[keys[i]] = $root.google.protobuf.Value.fromObject(object.sourceProperties[keys[i]]); - } - } - if (object.eventTime != null) { - if (typeof object.eventTime !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulatedFinding.eventTime: object expected"); - message.eventTime = $root.google.protobuf.Timestamp.fromObject(object.eventTime); - } - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "CRITICAL": - case 1: - message.severity = 1; - break; - case "HIGH": - case 2: - message.severity = 2; - break; - case "MEDIUM": - case 3: - message.severity = 3; - break; - case "LOW": - case 4: - message.severity = 4; - break; - } - switch (object.findingClass) { - default: - if (typeof object.findingClass === "number") { - message.findingClass = object.findingClass; - break; - } - break; - case "FINDING_CLASS_UNSPECIFIED": - case 0: - message.findingClass = 0; - break; - case "THREAT": - case 1: - message.findingClass = 1; - break; - case "VULNERABILITY": - case 2: - message.findingClass = 2; - break; - case "MISCONFIGURATION": - case 3: - message.findingClass = 3; - break; - case "OBSERVATION": - case 4: - message.findingClass = 4; - break; - case "SCC_ERROR": - case 5: - message.findingClass = 5; - break; - case "POSTURE_VIOLATION": - case 6: - message.findingClass = 6; - break; - case "TOXIC_COMBINATION": - case 7: - message.findingClass = 7; - break; - } - return message; - }; - - /** - * Creates a plain object from a SimulatedFinding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulatedFinding} message SimulatedFinding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulatedFinding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.sourceProperties = {}; - if (options.defaults) { - object.name = ""; - object.parent = ""; - object.resourceName = ""; - object.category = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.eventTime = null; - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - object.findingClass = options.enums === String ? "FINDING_CLASS_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.category != null && message.hasOwnProperty("category")) - object.category = message.category; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.State[message.state] === undefined ? message.state : $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.State[message.state] : message.state; - var keys2; - if (message.sourceProperties && (keys2 = Object.keys(message.sourceProperties)).length) { - object.sourceProperties = {}; - for (var j = 0; j < keys2.length; ++j) - object.sourceProperties[keys2[j]] = $root.google.protobuf.Value.toObject(message.sourceProperties[keys2[j]], options); - } - if (message.eventTime != null && message.hasOwnProperty("eventTime")) - object.eventTime = $root.google.protobuf.Timestamp.toObject(message.eventTime, options); - if (message.severity != null && message.hasOwnProperty("severity")) - object.severity = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity[message.severity] === undefined ? message.severity : $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity[message.severity] : message.severity; - if (message.findingClass != null && message.hasOwnProperty("findingClass")) - object.findingClass = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass[message.findingClass] === undefined ? message.findingClass : $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass[message.findingClass] : message.findingClass; - return object; - }; - - /** - * Converts this SimulatedFinding to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @instance - * @returns {Object.} JSON object - */ - SimulatedFinding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SimulatedFinding - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SimulatedFinding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimulatedFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulatedFinding"; - }; - - /** - * State enum. - * @name google.cloud.securitycentermanagement.v1.SimulatedFinding.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INACTIVE=2 INACTIVE value - */ - SimulatedFinding.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INACTIVE"] = 2; - return values; - })(); - - /** - * Severity enum. - * @name google.cloud.securitycentermanagement.v1.SimulatedFinding.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} CRITICAL=1 CRITICAL value - * @property {number} HIGH=2 HIGH value - * @property {number} MEDIUM=3 MEDIUM value - * @property {number} LOW=4 LOW value - */ - SimulatedFinding.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "CRITICAL"] = 1; - values[valuesById[2] = "HIGH"] = 2; - values[valuesById[3] = "MEDIUM"] = 3; - values[valuesById[4] = "LOW"] = 4; - return values; - })(); - - /** - * FindingClass enum. - * @name google.cloud.securitycentermanagement.v1.SimulatedFinding.FindingClass - * @enum {number} - * @property {number} FINDING_CLASS_UNSPECIFIED=0 FINDING_CLASS_UNSPECIFIED value - * @property {number} THREAT=1 THREAT value - * @property {number} VULNERABILITY=2 VULNERABILITY value - * @property {number} MISCONFIGURATION=3 MISCONFIGURATION value - * @property {number} OBSERVATION=4 OBSERVATION value - * @property {number} SCC_ERROR=5 SCC_ERROR value - * @property {number} POSTURE_VIOLATION=6 POSTURE_VIOLATION value - * @property {number} TOXIC_COMBINATION=7 TOXIC_COMBINATION value - */ - SimulatedFinding.FindingClass = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FINDING_CLASS_UNSPECIFIED"] = 0; - values[valuesById[1] = "THREAT"] = 1; - values[valuesById[2] = "VULNERABILITY"] = 2; - values[valuesById[3] = "MISCONFIGURATION"] = 3; - values[valuesById[4] = "OBSERVATION"] = 4; - values[valuesById[5] = "SCC_ERROR"] = 5; - values[valuesById[6] = "POSTURE_VIOLATION"] = 6; - values[valuesById[7] = "TOXIC_COMBINATION"] = 7; - return values; - })(); - - return SimulatedFinding; - })(); - - v1.SimulateSecurityHealthAnalyticsCustomModuleResponse = (function() { - - /** - * Properties of a SimulateSecurityHealthAnalyticsCustomModuleResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ISimulateSecurityHealthAnalyticsCustomModuleResponse - * @property {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null} [result] SimulateSecurityHealthAnalyticsCustomModuleResponse result - */ - - /** - * Constructs a new SimulateSecurityHealthAnalyticsCustomModuleResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a SimulateSecurityHealthAnalyticsCustomModuleResponse. - * @implements ISimulateSecurityHealthAnalyticsCustomModuleResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set - */ - function SimulateSecurityHealthAnalyticsCustomModuleResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimulateSecurityHealthAnalyticsCustomModuleResponse result. - * @member {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult|null|undefined} result - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @instance - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.result = null; - - /** - * Creates a new SimulateSecurityHealthAnalyticsCustomModuleResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse instance - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.create = function create(properties) { - return new SimulateSecurityHealthAnalyticsCustomModuleResponse(properties); - }; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SimulateSecurityHealthAnalyticsCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimulateSecurityHealthAnalyticsCustomModuleResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulateSecurityHealthAnalyticsCustomModuleResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a SimulateSecurityHealthAnalyticsCustomModuleResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} SimulateSecurityHealthAnalyticsCustomModuleResponse - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.result: object expected"); - message.result = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a SimulateSecurityHealthAnalyticsCustomModuleResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse} message SimulateSecurityHealthAnalyticsCustomModuleResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this SimulateSecurityHealthAnalyticsCustomModuleResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @instance - * @returns {Object.} JSON object - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SimulateSecurityHealthAnalyticsCustomModuleResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimulateSecurityHealthAnalyticsCustomModuleResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse"; - }; - - SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult = (function() { - - /** - * Properties of a SimulatedResult. - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @interface ISimulatedResult - * @property {google.cloud.securitycentermanagement.v1.ISimulatedFinding|null} [finding] SimulatedResult finding - * @property {google.protobuf.IEmpty|null} [noViolation] SimulatedResult noViolation - * @property {google.rpc.IStatus|null} [error] SimulatedResult error - */ - - /** - * Constructs a new SimulatedResult. - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse - * @classdesc Represents a SimulatedResult. - * @implements ISimulatedResult - * @constructor - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set - */ - function SimulatedResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimulatedResult finding. - * @member {google.cloud.securitycentermanagement.v1.ISimulatedFinding|null|undefined} finding - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - SimulatedResult.prototype.finding = null; - - /** - * SimulatedResult noViolation. - * @member {google.protobuf.IEmpty|null|undefined} noViolation - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - SimulatedResult.prototype.noViolation = null; - - /** - * SimulatedResult error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - SimulatedResult.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SimulatedResult result. - * @member {"finding"|"noViolation"|"error"|undefined} result - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - */ - Object.defineProperty(SimulatedResult.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["finding", "noViolation", "error"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SimulatedResult instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult instance - */ - SimulatedResult.create = function create(properties) { - return new SimulatedResult(properties); - }; - - /** - * Encodes the specified SimulatedResult message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.finding != null && Object.hasOwnProperty.call(message, "finding")) - $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.encode(message.finding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.noViolation != null && Object.hasOwnProperty.call(message, "noViolation")) - $root.google.protobuf.Empty.encode(message.noViolation, 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(); - return writer; - }; - - /** - * Encodes the specified SimulatedResult message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.ISimulatedResult} message SimulatedResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulatedResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimulatedResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.finding = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.decode(reader, reader.uint32()); - break; - } - case 2: { - message.noViolation = $root.google.protobuf.Empty.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimulatedResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulatedResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulatedResult message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulatedResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.finding != null && message.hasOwnProperty("finding")) { - properties.result = 1; - { - var error = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.verify(message.finding); - if (error) - return "finding." + error; - } - } - if (message.noViolation != null && message.hasOwnProperty("noViolation")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.protobuf.Empty.verify(message.noViolation); - if (error) - return "noViolation." + error; - } - } - if (message.error != null && message.hasOwnProperty("error")) { - if (properties.result === 1) - return "result: multiple values"; - properties.result = 1; - { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - } - return null; - }; - - /** - * Creates a SimulatedResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} SimulatedResult - */ - SimulatedResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult(); - if (object.finding != null) { - if (typeof object.finding !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.finding: object expected"); - message.finding = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.fromObject(object.finding); - } - if (object.noViolation != null) { - if (typeof object.noViolation !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.noViolation: object expected"); - message.noViolation = $root.google.protobuf.Empty.fromObject(object.noViolation); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - return message; - }; - - /** - * Creates a plain object from a SimulatedResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult} message SimulatedResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulatedResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.finding != null && message.hasOwnProperty("finding")) { - object.finding = $root.google.cloud.securitycentermanagement.v1.SimulatedFinding.toObject(message.finding, options); - if (options.oneofs) - object.result = "finding"; - } - if (message.noViolation != null && message.hasOwnProperty("noViolation")) { - object.noViolation = $root.google.protobuf.Empty.toObject(message.noViolation, options); - if (options.oneofs) - object.result = "noViolation"; - } - if (message.error != null && message.hasOwnProperty("error")) { - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (options.oneofs) - object.result = "error"; - } - return object; - }; - - /** - * Converts this SimulatedResult to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @instance - * @returns {Object.} JSON object - */ - SimulatedResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SimulatedResult - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SimulatedResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse.SimulatedResult"; - }; - - return SimulatedResult; - })(); - - return SimulateSecurityHealthAnalyticsCustomModuleResponse; - })(); - - v1.EffectiveEventThreatDetectionCustomModule = (function() { - - /** - * Properties of an EffectiveEventThreatDetectionCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IEffectiveEventThreatDetectionCustomModule - * @property {string|null} [name] EffectiveEventThreatDetectionCustomModule name - * @property {google.protobuf.IStruct|null} [config] EffectiveEventThreatDetectionCustomModule config - * @property {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState|null} [enablementState] EffectiveEventThreatDetectionCustomModule enablementState - * @property {string|null} [type] EffectiveEventThreatDetectionCustomModule type - * @property {string|null} [displayName] EffectiveEventThreatDetectionCustomModule displayName - * @property {string|null} [description] EffectiveEventThreatDetectionCustomModule description - */ - - /** - * Constructs a new EffectiveEventThreatDetectionCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents an EffectiveEventThreatDetectionCustomModule. - * @implements IEffectiveEventThreatDetectionCustomModule - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule=} [properties] Properties to set - */ - function EffectiveEventThreatDetectionCustomModule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EffectiveEventThreatDetectionCustomModule name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @instance - */ - EffectiveEventThreatDetectionCustomModule.prototype.name = ""; - - /** - * EffectiveEventThreatDetectionCustomModule config. - * @member {google.protobuf.IStruct|null|undefined} config - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @instance - */ - EffectiveEventThreatDetectionCustomModule.prototype.config = null; - - /** - * EffectiveEventThreatDetectionCustomModule enablementState. - * @member {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState} enablementState - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @instance - */ - EffectiveEventThreatDetectionCustomModule.prototype.enablementState = 0; - - /** - * EffectiveEventThreatDetectionCustomModule type. - * @member {string} type - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @instance - */ - EffectiveEventThreatDetectionCustomModule.prototype.type = ""; - - /** - * EffectiveEventThreatDetectionCustomModule displayName. - * @member {string} displayName - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @instance - */ - EffectiveEventThreatDetectionCustomModule.prototype.displayName = ""; - - /** - * EffectiveEventThreatDetectionCustomModule description. - * @member {string} description - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @instance - */ - EffectiveEventThreatDetectionCustomModule.prototype.description = ""; - - /** - * Creates a new EffectiveEventThreatDetectionCustomModule instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule instance - */ - EffectiveEventThreatDetectionCustomModule.create = function create(properties) { - return new EffectiveEventThreatDetectionCustomModule(properties); - }; - - /** - * Encodes the specified EffectiveEventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EffectiveEventThreatDetectionCustomModule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.protobuf.Struct.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.enablementState); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - return writer; - }; - - /** - * Encodes the specified EffectiveEventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EffectiveEventThreatDetectionCustomModule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EffectiveEventThreatDetectionCustomModule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.config = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.enablementState = reader.int32(); - break; - } - case 4: { - message.type = reader.string(); - break; - } - case 5: { - message.displayName = reader.string(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EffectiveEventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EffectiveEventThreatDetectionCustomModule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EffectiveEventThreatDetectionCustomModule message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EffectiveEventThreatDetectionCustomModule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.protobuf.Struct.verify(message.config); - if (error) - return "config." + error; - } - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - switch (message.enablementState) { - default: - return "enablementState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an EffectiveEventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} EffectiveEventThreatDetectionCustomModule - */ - EffectiveEventThreatDetectionCustomModule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule(); - if (object.name != null) - message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.config: object expected"); - message.config = $root.google.protobuf.Struct.fromObject(object.config); - } - switch (object.enablementState) { - default: - if (typeof object.enablementState === "number") { - message.enablementState = object.enablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.enablementState = 0; - break; - case "ENABLED": - case 1: - message.enablementState = 1; - break; - case "DISABLED": - case 2: - message.enablementState = 2; - break; - } - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an EffectiveEventThreatDetectionCustomModule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule} message EffectiveEventThreatDetectionCustomModule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EffectiveEventThreatDetectionCustomModule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.config = null; - object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.type = ""; - object.displayName = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.protobuf.Struct.toObject(message.config, options); - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState[message.enablementState] : message.enablementState; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this EffectiveEventThreatDetectionCustomModule to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @instance - * @returns {Object.} JSON object - */ - EffectiveEventThreatDetectionCustomModule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EffectiveEventThreatDetectionCustomModule - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EffectiveEventThreatDetectionCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule"; - }; - - /** - * EnablementState enum. - * @name google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.EnablementState - * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - */ - EffectiveEventThreatDetectionCustomModule.EnablementState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - return values; - })(); - - return EffectiveEventThreatDetectionCustomModule; - })(); - - v1.ListEffectiveEventThreatDetectionCustomModulesRequest = (function() { - - /** - * Properties of a ListEffectiveEventThreatDetectionCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListEffectiveEventThreatDetectionCustomModulesRequest - * @property {string|null} [parent] ListEffectiveEventThreatDetectionCustomModulesRequest parent - * @property {number|null} [pageSize] ListEffectiveEventThreatDetectionCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListEffectiveEventThreatDetectionCustomModulesRequest pageToken - */ - - /** - * Constructs a new ListEffectiveEventThreatDetectionCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListEffectiveEventThreatDetectionCustomModulesRequest. - * @implements IListEffectiveEventThreatDetectionCustomModulesRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest=} [properties] Properties to set - */ - function ListEffectiveEventThreatDetectionCustomModulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEffectiveEventThreatDetectionCustomModulesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @instance - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.parent = ""; - - /** - * ListEffectiveEventThreatDetectionCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @instance - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; - - /** - * ListEffectiveEventThreatDetectionCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @instance - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListEffectiveEventThreatDetectionCustomModulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest instance - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.create = function create(properties) { - return new ListEffectiveEventThreatDetectionCustomModulesRequest(properties); - }; - - /** - * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEffectiveEventThreatDetectionCustomModulesRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListEffectiveEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} ListEffectiveEventThreatDetectionCustomModulesRequest - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest} message ListEffectiveEventThreatDetectionCustomModulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListEffectiveEventThreatDetectionCustomModulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEffectiveEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest"; - }; - - return ListEffectiveEventThreatDetectionCustomModulesRequest; - })(); - - v1.ListEffectiveEventThreatDetectionCustomModulesResponse = (function() { - - /** - * Properties of a ListEffectiveEventThreatDetectionCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListEffectiveEventThreatDetectionCustomModulesResponse - * @property {Array.|null} [effectiveEventThreatDetectionCustomModules] ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules - * @property {string|null} [nextPageToken] ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken - */ - - /** - * Constructs a new ListEffectiveEventThreatDetectionCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListEffectiveEventThreatDetectionCustomModulesResponse. - * @implements IListEffectiveEventThreatDetectionCustomModulesResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse=} [properties] Properties to set - */ - function ListEffectiveEventThreatDetectionCustomModulesResponse(properties) { - this.effectiveEventThreatDetectionCustomModules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEffectiveEventThreatDetectionCustomModulesResponse effectiveEventThreatDetectionCustomModules. - * @member {Array.} effectiveEventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @instance - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.effectiveEventThreatDetectionCustomModules = $util.emptyArray; - - /** - * ListEffectiveEventThreatDetectionCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @instance - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEffectiveEventThreatDetectionCustomModulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse instance - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.create = function create(properties) { - return new ListEffectiveEventThreatDetectionCustomModulesResponse(properties); - }; - - /** - * Encodes the specified ListEffectiveEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.effectiveEventThreatDetectionCustomModules != null && message.effectiveEventThreatDetectionCustomModules.length) - for (var i = 0; i < message.effectiveEventThreatDetectionCustomModules.length; ++i) - $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.encode(message.effectiveEventThreatDetectionCustomModules[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 ListEffectiveEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.effectiveEventThreatDetectionCustomModules && message.effectiveEventThreatDetectionCustomModules.length)) - message.effectiveEventThreatDetectionCustomModules = []; - message.effectiveEventThreatDetectionCustomModules.push($root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEffectiveEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEffectiveEventThreatDetectionCustomModulesResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.effectiveEventThreatDetectionCustomModules != null && message.hasOwnProperty("effectiveEventThreatDetectionCustomModules")) { - if (!Array.isArray(message.effectiveEventThreatDetectionCustomModules)) - return "effectiveEventThreatDetectionCustomModules: array expected"; - for (var i = 0; i < message.effectiveEventThreatDetectionCustomModules.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.verify(message.effectiveEventThreatDetectionCustomModules[i]); - if (error) - return "effectiveEventThreatDetectionCustomModules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEffectiveEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} ListEffectiveEventThreatDetectionCustomModulesResponse - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse(); - if (object.effectiveEventThreatDetectionCustomModules) { - if (!Array.isArray(object.effectiveEventThreatDetectionCustomModules)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.effectiveEventThreatDetectionCustomModules: array expected"); - message.effectiveEventThreatDetectionCustomModules = []; - for (var i = 0; i < object.effectiveEventThreatDetectionCustomModules.length; ++i) { - if (typeof object.effectiveEventThreatDetectionCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse.effectiveEventThreatDetectionCustomModules: object expected"); - message.effectiveEventThreatDetectionCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.fromObject(object.effectiveEventThreatDetectionCustomModules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEffectiveEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse} message ListEffectiveEventThreatDetectionCustomModulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.effectiveEventThreatDetectionCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.effectiveEventThreatDetectionCustomModules && message.effectiveEventThreatDetectionCustomModules.length) { - object.effectiveEventThreatDetectionCustomModules = []; - for (var j = 0; j < message.effectiveEventThreatDetectionCustomModules.length; ++j) - object.effectiveEventThreatDetectionCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule.toObject(message.effectiveEventThreatDetectionCustomModules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEffectiveEventThreatDetectionCustomModulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEffectiveEventThreatDetectionCustomModulesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEffectiveEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse"; - }; - - return ListEffectiveEventThreatDetectionCustomModulesResponse; - })(); - - v1.GetEffectiveEventThreatDetectionCustomModuleRequest = (function() { - - /** - * Properties of a GetEffectiveEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IGetEffectiveEventThreatDetectionCustomModuleRequest - * @property {string|null} [name] GetEffectiveEventThreatDetectionCustomModuleRequest name - */ - - /** - * Constructs a new GetEffectiveEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a GetEffectiveEventThreatDetectionCustomModuleRequest. - * @implements IGetEffectiveEventThreatDetectionCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - */ - function GetEffectiveEventThreatDetectionCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEffectiveEventThreatDetectionCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @instance - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.prototype.name = ""; - - /** - * Creates a new GetEffectiveEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest instance - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.create = function create(properties) { - return new GetEffectiveEventThreatDetectionCustomModuleRequest(properties); - }; - - /** - * Encodes the specified GetEffectiveEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { - 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 GetEffectiveEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest(); - 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 GetEffectiveEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEffectiveEventThreatDetectionCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.verify = function verify(message) { - if (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 GetEffectiveEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} GetEffectiveEventThreatDetectionCustomModuleRequest - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEffectiveEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest} message GetEffectiveEventThreatDetectionCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.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 GetEffectiveEventThreatDetectionCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEffectiveEventThreatDetectionCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEffectiveEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest"; - }; - - return GetEffectiveEventThreatDetectionCustomModuleRequest; - })(); - - v1.EventThreatDetectionCustomModule = (function() { - - /** - * Properties of an EventThreatDetectionCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IEventThreatDetectionCustomModule - * @property {string|null} [name] EventThreatDetectionCustomModule name - * @property {google.protobuf.IStruct|null} [config] EventThreatDetectionCustomModule config - * @property {string|null} [ancestorModule] EventThreatDetectionCustomModule ancestorModule - * @property {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState|null} [enablementState] EventThreatDetectionCustomModule enablementState - * @property {string|null} [type] EventThreatDetectionCustomModule type - * @property {string|null} [displayName] EventThreatDetectionCustomModule displayName - * @property {string|null} [description] EventThreatDetectionCustomModule description - * @property {google.protobuf.ITimestamp|null} [updateTime] EventThreatDetectionCustomModule updateTime - * @property {string|null} [lastEditor] EventThreatDetectionCustomModule lastEditor - */ - - /** - * Constructs a new EventThreatDetectionCustomModule. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents an EventThreatDetectionCustomModule. - * @implements IEventThreatDetectionCustomModule - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule=} [properties] Properties to set - */ - function EventThreatDetectionCustomModule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventThreatDetectionCustomModule name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.name = ""; - - /** - * EventThreatDetectionCustomModule config. - * @member {google.protobuf.IStruct|null|undefined} config - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.config = null; - - /** - * EventThreatDetectionCustomModule ancestorModule. - * @member {string} ancestorModule - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.ancestorModule = ""; - - /** - * EventThreatDetectionCustomModule enablementState. - * @member {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState} enablementState - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.enablementState = 0; - - /** - * EventThreatDetectionCustomModule type. - * @member {string} type - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.type = ""; - - /** - * EventThreatDetectionCustomModule displayName. - * @member {string} displayName - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.displayName = ""; - - /** - * EventThreatDetectionCustomModule description. - * @member {string} description - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.description = ""; - - /** - * EventThreatDetectionCustomModule updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.updateTime = null; - - /** - * EventThreatDetectionCustomModule lastEditor. - * @member {string} lastEditor - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - */ - EventThreatDetectionCustomModule.prototype.lastEditor = ""; - - /** - * Creates a new EventThreatDetectionCustomModule instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule instance - */ - EventThreatDetectionCustomModule.create = function create(properties) { - return new EventThreatDetectionCustomModule(properties); - }; - - /** - * Encodes the specified EventThreatDetectionCustomModule message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule} message EventThreatDetectionCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventThreatDetectionCustomModule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.protobuf.Struct.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ancestorModule != null && Object.hasOwnProperty.call(message, "ancestorModule")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ancestorModule); - if (message.enablementState != null && Object.hasOwnProperty.call(message, "enablementState")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.enablementState); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.type); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.lastEditor != null && Object.hasOwnProperty.call(message, "lastEditor")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.lastEditor); - return writer; - }; - - /** - * Encodes the specified EventThreatDetectionCustomModule message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule} message EventThreatDetectionCustomModule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventThreatDetectionCustomModule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventThreatDetectionCustomModule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.config = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 3: { - message.ancestorModule = reader.string(); - break; - } - case 4: { - message.enablementState = reader.int32(); - break; - } - case 5: { - message.type = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 7: { - message.description = reader.string(); - break; - } - case 8: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.lastEditor = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventThreatDetectionCustomModule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventThreatDetectionCustomModule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventThreatDetectionCustomModule message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventThreatDetectionCustomModule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.protobuf.Struct.verify(message.config); - if (error) - return "config." + error; - } - if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) - if (!$util.isString(message.ancestorModule)) - return "ancestorModule: string expected"; - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - switch (message.enablementState) { - default: - return "enablementState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) - if (!$util.isString(message.lastEditor)) - return "lastEditor: string expected"; - return null; - }; - - /** - * Creates an EventThreatDetectionCustomModule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} EventThreatDetectionCustomModule - */ - EventThreatDetectionCustomModule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule(); - if (object.name != null) - message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.config: object expected"); - message.config = $root.google.protobuf.Struct.fromObject(object.config); - } - if (object.ancestorModule != null) - message.ancestorModule = String(object.ancestorModule); - switch (object.enablementState) { - default: - if (typeof object.enablementState === "number") { - message.enablementState = object.enablementState; - break; - } - break; - case "ENABLEMENT_STATE_UNSPECIFIED": - case 0: - message.enablementState = 0; - break; - case "ENABLED": - case 1: - message.enablementState = 1; - break; - case "DISABLED": - case 2: - message.enablementState = 2; - break; - case "INHERITED": - case 3: - message.enablementState = 3; - break; - } - if (object.type != null) - message.type = String(object.type); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastEditor != null) - message.lastEditor = String(object.lastEditor); - return message; - }; - - /** - * Creates a plain object from an EventThreatDetectionCustomModule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} message EventThreatDetectionCustomModule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventThreatDetectionCustomModule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.config = null; - object.ancestorModule = ""; - object.enablementState = options.enums === String ? "ENABLEMENT_STATE_UNSPECIFIED" : 0; - object.type = ""; - object.displayName = ""; - object.description = ""; - object.updateTime = null; - object.lastEditor = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.protobuf.Struct.toObject(message.config, options); - if (message.ancestorModule != null && message.hasOwnProperty("ancestorModule")) - object.ancestorModule = message.ancestorModule; - if (message.enablementState != null && message.hasOwnProperty("enablementState")) - object.enablementState = options.enums === String ? $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState[message.enablementState] === undefined ? message.enablementState : $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState[message.enablementState] : message.enablementState; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.lastEditor != null && message.hasOwnProperty("lastEditor")) - object.lastEditor = message.lastEditor; - return object; - }; - - /** - * Converts this EventThreatDetectionCustomModule to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @instance - * @returns {Object.} JSON object - */ - EventThreatDetectionCustomModule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EventThreatDetectionCustomModule - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EventThreatDetectionCustomModule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule"; - }; - - /** - * EnablementState enum. - * @name google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.EnablementState - * @enum {number} - * @property {number} ENABLEMENT_STATE_UNSPECIFIED=0 ENABLEMENT_STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - * @property {number} INHERITED=3 INHERITED value - */ - EventThreatDetectionCustomModule.EnablementState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENABLEMENT_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - values[valuesById[3] = "INHERITED"] = 3; - return values; - })(); - - return EventThreatDetectionCustomModule; - })(); - - v1.ListEventThreatDetectionCustomModulesRequest = (function() { - - /** - * Properties of a ListEventThreatDetectionCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListEventThreatDetectionCustomModulesRequest - * @property {string|null} [parent] ListEventThreatDetectionCustomModulesRequest parent - * @property {number|null} [pageSize] ListEventThreatDetectionCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListEventThreatDetectionCustomModulesRequest pageToken - */ - - /** - * Constructs a new ListEventThreatDetectionCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListEventThreatDetectionCustomModulesRequest. - * @implements IListEventThreatDetectionCustomModulesRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest=} [properties] Properties to set - */ - function ListEventThreatDetectionCustomModulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEventThreatDetectionCustomModulesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @instance - */ - ListEventThreatDetectionCustomModulesRequest.prototype.parent = ""; - - /** - * ListEventThreatDetectionCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @instance - */ - ListEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; - - /** - * ListEventThreatDetectionCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @instance - */ - ListEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListEventThreatDetectionCustomModulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest instance - */ - ListEventThreatDetectionCustomModulesRequest.create = function create(properties) { - return new ListEventThreatDetectionCustomModulesRequest(properties); - }; - - /** - * Encodes the specified ListEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEventThreatDetectionCustomModulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEventThreatDetectionCustomModulesRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEventThreatDetectionCustomModulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} ListEventThreatDetectionCustomModulesRequest - */ - ListEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest} message ListEventThreatDetectionCustomModulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListEventThreatDetectionCustomModulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEventThreatDetectionCustomModulesRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest"; - }; - - return ListEventThreatDetectionCustomModulesRequest; - })(); - - v1.ListEventThreatDetectionCustomModulesResponse = (function() { - - /** - * Properties of a ListEventThreatDetectionCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListEventThreatDetectionCustomModulesResponse - * @property {Array.|null} [eventThreatDetectionCustomModules] ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules - * @property {string|null} [nextPageToken] ListEventThreatDetectionCustomModulesResponse nextPageToken - */ - - /** - * Constructs a new ListEventThreatDetectionCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListEventThreatDetectionCustomModulesResponse. - * @implements IListEventThreatDetectionCustomModulesResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse=} [properties] Properties to set - */ - function ListEventThreatDetectionCustomModulesResponse(properties) { - this.eventThreatDetectionCustomModules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. - * @member {Array.} eventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @instance - */ - ListEventThreatDetectionCustomModulesResponse.prototype.eventThreatDetectionCustomModules = $util.emptyArray; - - /** - * ListEventThreatDetectionCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @instance - */ - ListEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEventThreatDetectionCustomModulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse instance - */ - ListEventThreatDetectionCustomModulesResponse.create = function create(properties) { - return new ListEventThreatDetectionCustomModulesResponse(properties); - }; - - /** - * Encodes the specified ListEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventThreatDetectionCustomModules != null && message.eventThreatDetectionCustomModules.length) - for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) - $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModules[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 ListEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEventThreatDetectionCustomModulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length)) - message.eventThreatDetectionCustomModules = []; - message.eventThreatDetectionCustomModules.push($root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEventThreatDetectionCustomModulesResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEventThreatDetectionCustomModulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventThreatDetectionCustomModules != null && message.hasOwnProperty("eventThreatDetectionCustomModules")) { - if (!Array.isArray(message.eventThreatDetectionCustomModules)) - return "eventThreatDetectionCustomModules: array expected"; - for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModules[i]); - if (error) - return "eventThreatDetectionCustomModules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} ListEventThreatDetectionCustomModulesResponse - */ - ListEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse(); - if (object.eventThreatDetectionCustomModules) { - if (!Array.isArray(object.eventThreatDetectionCustomModules)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: array expected"); - message.eventThreatDetectionCustomModules = []; - for (var i = 0; i < object.eventThreatDetectionCustomModules.length; ++i) { - if (typeof object.eventThreatDetectionCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: object expected"); - message.eventThreatDetectionCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse} message ListEventThreatDetectionCustomModulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.eventThreatDetectionCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length) { - object.eventThreatDetectionCustomModules = []; - for (var j = 0; j < message.eventThreatDetectionCustomModules.length; ++j) - object.eventThreatDetectionCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEventThreatDetectionCustomModulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEventThreatDetectionCustomModulesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse"; - }; - - return ListEventThreatDetectionCustomModulesResponse; - })(); - - v1.ListDescendantEventThreatDetectionCustomModulesRequest = (function() { - - /** - * Properties of a ListDescendantEventThreatDetectionCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListDescendantEventThreatDetectionCustomModulesRequest - * @property {string|null} [parent] ListDescendantEventThreatDetectionCustomModulesRequest parent - * @property {number|null} [pageSize] ListDescendantEventThreatDetectionCustomModulesRequest pageSize - * @property {string|null} [pageToken] ListDescendantEventThreatDetectionCustomModulesRequest pageToken - */ - - /** - * Constructs a new ListDescendantEventThreatDetectionCustomModulesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListDescendantEventThreatDetectionCustomModulesRequest. - * @implements IListDescendantEventThreatDetectionCustomModulesRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest=} [properties] Properties to set - */ - function ListDescendantEventThreatDetectionCustomModulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDescendantEventThreatDetectionCustomModulesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @instance - */ - ListDescendantEventThreatDetectionCustomModulesRequest.prototype.parent = ""; - - /** - * ListDescendantEventThreatDetectionCustomModulesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @instance - */ - ListDescendantEventThreatDetectionCustomModulesRequest.prototype.pageSize = 0; - - /** - * ListDescendantEventThreatDetectionCustomModulesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @instance - */ - ListDescendantEventThreatDetectionCustomModulesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListDescendantEventThreatDetectionCustomModulesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest instance - */ - ListDescendantEventThreatDetectionCustomModulesRequest.create = function create(properties) { - return new ListDescendantEventThreatDetectionCustomModulesRequest(properties); - }; - - /** - * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantEventThreatDetectionCustomModulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListDescendantEventThreatDetectionCustomModulesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantEventThreatDetectionCustomModulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantEventThreatDetectionCustomModulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantEventThreatDetectionCustomModulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDescendantEventThreatDetectionCustomModulesRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDescendantEventThreatDetectionCustomModulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListDescendantEventThreatDetectionCustomModulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} ListDescendantEventThreatDetectionCustomModulesRequest - */ - ListDescendantEventThreatDetectionCustomModulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest} message ListDescendantEventThreatDetectionCustomModulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDescendantEventThreatDetectionCustomModulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListDescendantEventThreatDetectionCustomModulesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDescendantEventThreatDetectionCustomModulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDescendantEventThreatDetectionCustomModulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest"; - }; - - return ListDescendantEventThreatDetectionCustomModulesRequest; - })(); - - v1.ListDescendantEventThreatDetectionCustomModulesResponse = (function() { - - /** - * Properties of a ListDescendantEventThreatDetectionCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListDescendantEventThreatDetectionCustomModulesResponse - * @property {Array.|null} [eventThreatDetectionCustomModules] ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules - * @property {string|null} [nextPageToken] ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken - */ - - /** - * Constructs a new ListDescendantEventThreatDetectionCustomModulesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListDescendantEventThreatDetectionCustomModulesResponse. - * @implements IListDescendantEventThreatDetectionCustomModulesResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse=} [properties] Properties to set - */ - function ListDescendantEventThreatDetectionCustomModulesResponse(properties) { - this.eventThreatDetectionCustomModules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDescendantEventThreatDetectionCustomModulesResponse eventThreatDetectionCustomModules. - * @member {Array.} eventThreatDetectionCustomModules - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @instance - */ - ListDescendantEventThreatDetectionCustomModulesResponse.prototype.eventThreatDetectionCustomModules = $util.emptyArray; - - /** - * ListDescendantEventThreatDetectionCustomModulesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @instance - */ - ListDescendantEventThreatDetectionCustomModulesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListDescendantEventThreatDetectionCustomModulesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse instance - */ - ListDescendantEventThreatDetectionCustomModulesResponse.create = function create(properties) { - return new ListDescendantEventThreatDetectionCustomModulesResponse(properties); - }; - - /** - * Encodes the specified ListDescendantEventThreatDetectionCustomModulesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantEventThreatDetectionCustomModulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventThreatDetectionCustomModules != null && message.eventThreatDetectionCustomModules.length) - for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) - $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModules[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 ListDescendantEventThreatDetectionCustomModulesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDescendantEventThreatDetectionCustomModulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantEventThreatDetectionCustomModulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length)) - message.eventThreatDetectionCustomModules = []; - message.eventThreatDetectionCustomModules.push($root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListDescendantEventThreatDetectionCustomModulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDescendantEventThreatDetectionCustomModulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDescendantEventThreatDetectionCustomModulesResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDescendantEventThreatDetectionCustomModulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventThreatDetectionCustomModules != null && message.hasOwnProperty("eventThreatDetectionCustomModules")) { - if (!Array.isArray(message.eventThreatDetectionCustomModules)) - return "eventThreatDetectionCustomModules: array expected"; - for (var i = 0; i < message.eventThreatDetectionCustomModules.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModules[i]); - if (error) - return "eventThreatDetectionCustomModules." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListDescendantEventThreatDetectionCustomModulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} ListDescendantEventThreatDetectionCustomModulesResponse - */ - ListDescendantEventThreatDetectionCustomModulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse(); - if (object.eventThreatDetectionCustomModules) { - if (!Array.isArray(object.eventThreatDetectionCustomModules)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: array expected"); - message.eventThreatDetectionCustomModules = []; - for (var i = 0; i < object.eventThreatDetectionCustomModules.length; ++i) { - if (typeof object.eventThreatDetectionCustomModules[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse.eventThreatDetectionCustomModules: object expected"); - message.eventThreatDetectionCustomModules[i] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModules[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListDescendantEventThreatDetectionCustomModulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse} message ListDescendantEventThreatDetectionCustomModulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDescendantEventThreatDetectionCustomModulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.eventThreatDetectionCustomModules = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.eventThreatDetectionCustomModules && message.eventThreatDetectionCustomModules.length) { - object.eventThreatDetectionCustomModules = []; - for (var j = 0; j < message.eventThreatDetectionCustomModules.length; ++j) - object.eventThreatDetectionCustomModules[j] = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModules[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListDescendantEventThreatDetectionCustomModulesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDescendantEventThreatDetectionCustomModulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDescendantEventThreatDetectionCustomModulesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDescendantEventThreatDetectionCustomModulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse"; - }; - - return ListDescendantEventThreatDetectionCustomModulesResponse; - })(); - - v1.GetEventThreatDetectionCustomModuleRequest = (function() { - - /** - * Properties of a GetEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IGetEventThreatDetectionCustomModuleRequest - * @property {string|null} [name] GetEventThreatDetectionCustomModuleRequest name - */ - - /** - * Constructs a new GetEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a GetEventThreatDetectionCustomModuleRequest. - * @implements IGetEventThreatDetectionCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - */ - function GetEventThreatDetectionCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEventThreatDetectionCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @instance - */ - GetEventThreatDetectionCustomModuleRequest.prototype.name = ""; - - /** - * Creates a new GetEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest instance - */ - GetEventThreatDetectionCustomModuleRequest.create = function create(properties) { - return new GetEventThreatDetectionCustomModuleRequest(properties); - }; - - /** - * Encodes the specified GetEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { - 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 GetEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest(); - 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 GetEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEventThreatDetectionCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEventThreatDetectionCustomModuleRequest.verify = function verify(message) { - if (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 GetEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} GetEventThreatDetectionCustomModuleRequest - */ - GetEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest} message GetEventThreatDetectionCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEventThreatDetectionCustomModuleRequest.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 GetEventThreatDetectionCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - GetEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEventThreatDetectionCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest"; - }; - - return GetEventThreatDetectionCustomModuleRequest; - })(); - - v1.CreateEventThreatDetectionCustomModuleRequest = (function() { - - /** - * Properties of a CreateEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface ICreateEventThreatDetectionCustomModuleRequest - * @property {string|null} [parent] CreateEventThreatDetectionCustomModuleRequest parent - * @property {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null} [eventThreatDetectionCustomModule] CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule - * @property {boolean|null} [validateOnly] CreateEventThreatDetectionCustomModuleRequest validateOnly - */ - - /** - * Constructs a new CreateEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a CreateEventThreatDetectionCustomModuleRequest. - * @implements ICreateEventThreatDetectionCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - */ - function CreateEventThreatDetectionCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEventThreatDetectionCustomModuleRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @instance - */ - CreateEventThreatDetectionCustomModuleRequest.prototype.parent = ""; - - /** - * CreateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. - * @member {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null|undefined} eventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @instance - */ - CreateEventThreatDetectionCustomModuleRequest.prototype.eventThreatDetectionCustomModule = null; - - /** - * CreateEventThreatDetectionCustomModuleRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @instance - */ - CreateEventThreatDetectionCustomModuleRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest instance - */ - CreateEventThreatDetectionCustomModuleRequest.create = function create(properties) { - return new CreateEventThreatDetectionCustomModuleRequest(properties); - }; - - /** - * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && Object.hasOwnProperty.call(message, "eventThreatDetectionCustomModule")) - $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified CreateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 3: { - message.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32()); - break; - } - case 4: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEventThreatDetectionCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) { - var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModule); - if (error) - return "eventThreatDetectionCustomModule." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a CreateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} CreateEventThreatDetectionCustomModuleRequest - */ - CreateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.eventThreatDetectionCustomModule != null) { - if (typeof object.eventThreatDetectionCustomModule !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest.eventThreatDetectionCustomModule: object expected"); - message.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModule); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest} message CreateEventThreatDetectionCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.eventThreatDetectionCustomModule = null; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) - object.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModule, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateEventThreatDetectionCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEventThreatDetectionCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest"; - }; - - return CreateEventThreatDetectionCustomModuleRequest; - })(); - - v1.UpdateEventThreatDetectionCustomModuleRequest = (function() { - - /** - * Properties of an UpdateEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IUpdateEventThreatDetectionCustomModuleRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEventThreatDetectionCustomModuleRequest updateMask - * @property {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null} [eventThreatDetectionCustomModule] UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule - * @property {boolean|null} [validateOnly] UpdateEventThreatDetectionCustomModuleRequest validateOnly - */ - - /** - * Constructs a new UpdateEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents an UpdateEventThreatDetectionCustomModuleRequest. - * @implements IUpdateEventThreatDetectionCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - */ - function UpdateEventThreatDetectionCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEventThreatDetectionCustomModuleRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @instance - */ - UpdateEventThreatDetectionCustomModuleRequest.prototype.updateMask = null; - - /** - * UpdateEventThreatDetectionCustomModuleRequest eventThreatDetectionCustomModule. - * @member {google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null|undefined} eventThreatDetectionCustomModule - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @instance - */ - UpdateEventThreatDetectionCustomModuleRequest.prototype.eventThreatDetectionCustomModule = null; - - /** - * UpdateEventThreatDetectionCustomModuleRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @instance - */ - UpdateEventThreatDetectionCustomModuleRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest instance - */ - UpdateEventThreatDetectionCustomModuleRequest.create = function create(properties) { - return new UpdateEventThreatDetectionCustomModuleRequest(properties); - }; - - /** - * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && Object.hasOwnProperty.call(message, "eventThreatDetectionCustomModule")) - $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.encode(message.eventThreatDetectionCustomModule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest(); - 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.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEventThreatDetectionCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEventThreatDetectionCustomModuleRequest.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.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) { - var error = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.verify(message.eventThreatDetectionCustomModule); - if (error) - return "eventThreatDetectionCustomModule." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} UpdateEventThreatDetectionCustomModuleRequest - */ - UpdateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.eventThreatDetectionCustomModule != null) { - if (typeof object.eventThreatDetectionCustomModule !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest.eventThreatDetectionCustomModule: object expected"); - message.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.fromObject(object.eventThreatDetectionCustomModule); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest} message UpdateEventThreatDetectionCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.eventThreatDetectionCustomModule = null; - object.validateOnly = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.eventThreatDetectionCustomModule != null && message.hasOwnProperty("eventThreatDetectionCustomModule")) - object.eventThreatDetectionCustomModule = $root.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.toObject(message.eventThreatDetectionCustomModule, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateEventThreatDetectionCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEventThreatDetectionCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest"; - }; - - return UpdateEventThreatDetectionCustomModuleRequest; - })(); - - v1.DeleteEventThreatDetectionCustomModuleRequest = (function() { - - /** - * Properties of a DeleteEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IDeleteEventThreatDetectionCustomModuleRequest - * @property {string|null} [name] DeleteEventThreatDetectionCustomModuleRequest name - * @property {boolean|null} [validateOnly] DeleteEventThreatDetectionCustomModuleRequest validateOnly - */ - - /** - * Constructs a new DeleteEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a DeleteEventThreatDetectionCustomModuleRequest. - * @implements IDeleteEventThreatDetectionCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - */ - function DeleteEventThreatDetectionCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEventThreatDetectionCustomModuleRequest name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @instance - */ - DeleteEventThreatDetectionCustomModuleRequest.prototype.name = ""; - - /** - * DeleteEventThreatDetectionCustomModuleRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @instance - */ - DeleteEventThreatDetectionCustomModuleRequest.prototype.validateOnly = false; - - /** - * Creates a new DeleteEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest instance - */ - DeleteEventThreatDetectionCustomModuleRequest.create = function create(properties) { - return new DeleteEventThreatDetectionCustomModuleRequest(properties); - }; - - /** - * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEventThreatDetectionCustomModuleRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified DeleteEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEventThreatDetectionCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEventThreatDetectionCustomModuleRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates a DeleteEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} DeleteEventThreatDetectionCustomModuleRequest - */ - DeleteEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a DeleteEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest} message DeleteEventThreatDetectionCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.validateOnly = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this DeleteEventThreatDetectionCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEventThreatDetectionCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest"; - }; - - return DeleteEventThreatDetectionCustomModuleRequest; - })(); - - v1.ValidateEventThreatDetectionCustomModuleRequest = (function() { - - /** - * Properties of a ValidateEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IValidateEventThreatDetectionCustomModuleRequest - * @property {string|null} [parent] ValidateEventThreatDetectionCustomModuleRequest parent - * @property {string|null} [rawText] ValidateEventThreatDetectionCustomModuleRequest rawText - * @property {string|null} [type] ValidateEventThreatDetectionCustomModuleRequest type - */ - - /** - * Constructs a new ValidateEventThreatDetectionCustomModuleRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ValidateEventThreatDetectionCustomModuleRequest. - * @implements IValidateEventThreatDetectionCustomModuleRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - */ - function ValidateEventThreatDetectionCustomModuleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidateEventThreatDetectionCustomModuleRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @instance - */ - ValidateEventThreatDetectionCustomModuleRequest.prototype.parent = ""; - - /** - * ValidateEventThreatDetectionCustomModuleRequest rawText. - * @member {string} rawText - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @instance - */ - ValidateEventThreatDetectionCustomModuleRequest.prototype.rawText = ""; - - /** - * ValidateEventThreatDetectionCustomModuleRequest type. - * @member {string} type - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @instance - */ - ValidateEventThreatDetectionCustomModuleRequest.prototype.type = ""; - - /** - * Creates a new ValidateEventThreatDetectionCustomModuleRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest instance - */ - ValidateEventThreatDetectionCustomModuleRequest.create = function create(properties) { - return new ValidateEventThreatDetectionCustomModuleRequest(properties); - }; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateEventThreatDetectionCustomModuleRequest.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.rawText != null && Object.hasOwnProperty.call(message, "rawText")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rawText); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateEventThreatDetectionCustomModuleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateEventThreatDetectionCustomModuleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.rawText = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateEventThreatDetectionCustomModuleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidateEventThreatDetectionCustomModuleRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateEventThreatDetectionCustomModuleRequest.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.rawText != null && message.hasOwnProperty("rawText")) - if (!$util.isString(message.rawText)) - return "rawText: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - return null; - }; - - /** - * Creates a ValidateEventThreatDetectionCustomModuleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} ValidateEventThreatDetectionCustomModuleRequest - */ - ValidateEventThreatDetectionCustomModuleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.rawText != null) - message.rawText = String(object.rawText); - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from a ValidateEventThreatDetectionCustomModuleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest} message ValidateEventThreatDetectionCustomModuleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidateEventThreatDetectionCustomModuleRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.rawText = ""; - object.type = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.rawText != null && message.hasOwnProperty("rawText")) - object.rawText = message.rawText; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this ValidateEventThreatDetectionCustomModuleRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @instance - * @returns {Object.} JSON object - */ - ValidateEventThreatDetectionCustomModuleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidateEventThreatDetectionCustomModuleRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidateEventThreatDetectionCustomModuleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest"; - }; - - return ValidateEventThreatDetectionCustomModuleRequest; - })(); - - v1.ValidateEventThreatDetectionCustomModuleResponse = (function() { - - /** - * Properties of a ValidateEventThreatDetectionCustomModuleResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IValidateEventThreatDetectionCustomModuleResponse - * @property {Array.|null} [errors] ValidateEventThreatDetectionCustomModuleResponse errors - */ - - /** - * Constructs a new ValidateEventThreatDetectionCustomModuleResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ValidateEventThreatDetectionCustomModuleResponse. - * @implements IValidateEventThreatDetectionCustomModuleResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse=} [properties] Properties to set - */ - function ValidateEventThreatDetectionCustomModuleResponse(properties) { - this.errors = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidateEventThreatDetectionCustomModuleResponse errors. - * @member {Array.} errors - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @instance - */ - ValidateEventThreatDetectionCustomModuleResponse.prototype.errors = $util.emptyArray; - - /** - * Creates a new ValidateEventThreatDetectionCustomModuleResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse instance - */ - ValidateEventThreatDetectionCustomModuleResponse.create = function create(properties) { - return new ValidateEventThreatDetectionCustomModuleResponse(properties); - }; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateEventThreatDetectionCustomModuleResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidateEventThreatDetectionCustomModuleResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateEventThreatDetectionCustomModuleResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateEventThreatDetectionCustomModuleResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidateEventThreatDetectionCustomModuleResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateEventThreatDetectionCustomModuleResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidateEventThreatDetectionCustomModuleResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateEventThreatDetectionCustomModuleResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - return null; - }; - - /** - * Creates a ValidateEventThreatDetectionCustomModuleResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} ValidateEventThreatDetectionCustomModuleResponse - */ - ValidateEventThreatDetectionCustomModuleResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse(); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.errors: object expected"); - message.errors[i] = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.fromObject(object.errors[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ValidateEventThreatDetectionCustomModuleResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse} message ValidateEventThreatDetectionCustomModuleResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidateEventThreatDetectionCustomModuleResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.errors = []; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.toObject(message.errors[j], options); - } - return object; - }; - - /** - * Converts this ValidateEventThreatDetectionCustomModuleResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @instance - * @returns {Object.} JSON object - */ - ValidateEventThreatDetectionCustomModuleResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidateEventThreatDetectionCustomModuleResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidateEventThreatDetectionCustomModuleResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse"; - }; - - ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError = (function() { - - /** - * Properties of a CustomModuleValidationError. - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @interface ICustomModuleValidationError - * @property {string|null} [description] CustomModuleValidationError description - * @property {string|null} [fieldPath] CustomModuleValidationError fieldPath - * @property {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null} [start] CustomModuleValidationError start - * @property {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null} [end] CustomModuleValidationError end - */ - - /** - * Constructs a new CustomModuleValidationError. - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @classdesc Represents a CustomModuleValidationError. - * @implements ICustomModuleValidationError - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError=} [properties] Properties to set - */ - function CustomModuleValidationError(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomModuleValidationError description. - * @member {string} description - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @instance - */ - CustomModuleValidationError.prototype.description = ""; - - /** - * CustomModuleValidationError fieldPath. - * @member {string} fieldPath - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @instance - */ - CustomModuleValidationError.prototype.fieldPath = ""; - - /** - * CustomModuleValidationError start. - * @member {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null|undefined} start - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @instance - */ - CustomModuleValidationError.prototype.start = null; - - /** - * CustomModuleValidationError end. - * @member {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition|null|undefined} end - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @instance - */ - CustomModuleValidationError.prototype.end = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CustomModuleValidationError _start. - * @member {"start"|undefined} _start - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @instance - */ - Object.defineProperty(CustomModuleValidationError.prototype, "_start", { - get: $util.oneOfGetter($oneOfFields = ["start"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CustomModuleValidationError _end. - * @member {"end"|undefined} _end - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @instance - */ - Object.defineProperty(CustomModuleValidationError.prototype, "_end", { - get: $util.oneOfGetter($oneOfFields = ["end"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CustomModuleValidationError instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError instance - */ - CustomModuleValidationError.create = function create(properties) { - return new CustomModuleValidationError(properties); - }; - - /** - * Encodes the specified CustomModuleValidationError message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError} message CustomModuleValidationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomModuleValidationError.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.fieldPath != null && Object.hasOwnProperty.call(message, "fieldPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fieldPath); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.encode(message.start, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.encode(message.end, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CustomModuleValidationError message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.ICustomModuleValidationError} message CustomModuleValidationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomModuleValidationError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomModuleValidationError message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomModuleValidationError.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.fieldPath = reader.string(); - break; - } - case 3: { - message.start = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.decode(reader, reader.uint32()); - break; - } - case 4: { - message.end = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomModuleValidationError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomModuleValidationError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomModuleValidationError message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomModuleValidationError.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.fieldPath != null && message.hasOwnProperty("fieldPath")) - if (!$util.isString(message.fieldPath)) - return "fieldPath: string expected"; - if (message.start != null && message.hasOwnProperty("start")) { - properties._start = 1; - { - var error = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify(message.start); - if (error) - return "start." + error; - } - } - if (message.end != null && message.hasOwnProperty("end")) { - properties._end = 1; - { - var error = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify(message.end); - if (error) - return "end." + error; - } - } - return null; - }; - - /** - * Creates a CustomModuleValidationError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} CustomModuleValidationError - */ - CustomModuleValidationError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError(); - if (object.description != null) - message.description = String(object.description); - if (object.fieldPath != null) - message.fieldPath = String(object.fieldPath); - if (object.start != null) { - if (typeof object.start !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.start: object expected"); - message.start = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.fromObject(object.start); - } - if (object.end != null) { - if (typeof object.end !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError.end: object expected"); - message.end = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.fromObject(object.end); - } - return message; - }; - - /** - * Creates a plain object from a CustomModuleValidationError message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError} message CustomModuleValidationError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomModuleValidationError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = ""; - object.fieldPath = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) - object.fieldPath = message.fieldPath; - if (message.start != null && message.hasOwnProperty("start")) { - object.start = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.toObject(message.start, options); - if (options.oneofs) - object._start = "start"; - } - if (message.end != null && message.hasOwnProperty("end")) { - object.end = $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.toObject(message.end, options); - if (options.oneofs) - object._end = "end"; - } - return object; - }; - - /** - * Converts this CustomModuleValidationError to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @instance - * @returns {Object.} JSON object - */ - CustomModuleValidationError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomModuleValidationError - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomModuleValidationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.CustomModuleValidationError"; - }; - - return CustomModuleValidationError; - })(); - - ValidateEventThreatDetectionCustomModuleResponse.Position = (function() { - - /** - * Properties of a Position. - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @interface IPosition - * @property {number|null} [lineNumber] Position lineNumber - * @property {number|null} [columnNumber] Position columnNumber - */ - - /** - * Constructs a new Position. - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse - * @classdesc Represents a Position. - * @implements IPosition - * @constructor - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition=} [properties] Properties to set - */ - function Position(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Position lineNumber. - * @member {number} lineNumber - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @instance - */ - Position.prototype.lineNumber = 0; - - /** - * Position columnNumber. - * @member {number} columnNumber - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @instance - */ - Position.prototype.columnNumber = 0; - - /** - * Creates a new Position instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position instance - */ - Position.create = function create(properties) { - return new Position(properties); - }; - - /** - * Encodes the specified Position message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition} message Position message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Position.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lineNumber != null && Object.hasOwnProperty.call(message, "lineNumber")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lineNumber); - if (message.columnNumber != null && Object.hasOwnProperty.call(message, "columnNumber")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.columnNumber); - return writer; - }; - - /** - * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.IPosition} message Position message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Position.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Position message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Position.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lineNumber = reader.int32(); - break; - } - case 2: { - message.columnNumber = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Position message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Position.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Position message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Position.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) - if (!$util.isInteger(message.lineNumber)) - return "lineNumber: integer expected"; - if (message.columnNumber != null && message.hasOwnProperty("columnNumber")) - if (!$util.isInteger(message.columnNumber)) - return "columnNumber: integer expected"; - return null; - }; - - /** - * Creates a Position message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} Position - */ - Position.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position(); - if (object.lineNumber != null) - message.lineNumber = object.lineNumber | 0; - if (object.columnNumber != null) - message.columnNumber = object.columnNumber | 0; - return message; - }; - - /** - * Creates a plain object from a Position message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position} message Position - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Position.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lineNumber = 0; - object.columnNumber = 0; - } - if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) - object.lineNumber = message.lineNumber; - if (message.columnNumber != null && message.hasOwnProperty("columnNumber")) - object.columnNumber = message.columnNumber; - return object; - }; - - /** - * Converts this Position to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @instance - * @returns {Object.} JSON object - */ - Position.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Position - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse.Position"; - }; - - return Position; - })(); - - return ValidateEventThreatDetectionCustomModuleResponse; - })(); - - v1.GetSecurityCenterServiceRequest = (function() { - - /** - * Properties of a GetSecurityCenterServiceRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IGetSecurityCenterServiceRequest - * @property {string|null} [name] GetSecurityCenterServiceRequest name - * @property {boolean|null} [showEligibleModulesOnly] GetSecurityCenterServiceRequest showEligibleModulesOnly - */ - - /** - * Constructs a new GetSecurityCenterServiceRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a GetSecurityCenterServiceRequest. - * @implements IGetSecurityCenterServiceRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest=} [properties] Properties to set - */ - function GetSecurityCenterServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSecurityCenterServiceRequest name. - * @member {string} name - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @instance - */ - GetSecurityCenterServiceRequest.prototype.name = ""; - - /** - * GetSecurityCenterServiceRequest showEligibleModulesOnly. - * @member {boolean} showEligibleModulesOnly - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @instance - */ - GetSecurityCenterServiceRequest.prototype.showEligibleModulesOnly = false; - - /** - * Creates a new GetSecurityCenterServiceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest instance - */ - GetSecurityCenterServiceRequest.create = function create(properties) { - return new GetSecurityCenterServiceRequest(properties); - }; - - /** - * Encodes the specified GetSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} message GetSecurityCenterServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecurityCenterServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.showEligibleModulesOnly != null && Object.hasOwnProperty.call(message, "showEligibleModulesOnly")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.showEligibleModulesOnly); - return writer; - }; - - /** - * Encodes the specified GetSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest} message GetSecurityCenterServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSecurityCenterServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecurityCenterServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.showEligibleModulesOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSecurityCenterServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSecurityCenterServiceRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSecurityCenterServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) - if (typeof message.showEligibleModulesOnly !== "boolean") - return "showEligibleModulesOnly: boolean expected"; - return null; - }; - - /** - * Creates a GetSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} GetSecurityCenterServiceRequest - */ - GetSecurityCenterServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.showEligibleModulesOnly != null) - message.showEligibleModulesOnly = Boolean(object.showEligibleModulesOnly); - return message; - }; - - /** - * Creates a plain object from a GetSecurityCenterServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest} message GetSecurityCenterServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSecurityCenterServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.showEligibleModulesOnly = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) - object.showEligibleModulesOnly = message.showEligibleModulesOnly; - return object; - }; - - /** - * Converts this GetSecurityCenterServiceRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @instance - * @returns {Object.} JSON object - */ - GetSecurityCenterServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetSecurityCenterServiceRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetSecurityCenterServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest"; - }; - - return GetSecurityCenterServiceRequest; - })(); - - v1.ListSecurityCenterServicesRequest = (function() { - - /** - * Properties of a ListSecurityCenterServicesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListSecurityCenterServicesRequest - * @property {string|null} [parent] ListSecurityCenterServicesRequest parent - * @property {number|null} [pageSize] ListSecurityCenterServicesRequest pageSize - * @property {string|null} [pageToken] ListSecurityCenterServicesRequest pageToken - * @property {boolean|null} [showEligibleModulesOnly] ListSecurityCenterServicesRequest showEligibleModulesOnly - */ - - /** - * Constructs a new ListSecurityCenterServicesRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListSecurityCenterServicesRequest. - * @implements IListSecurityCenterServicesRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest=} [properties] Properties to set - */ - function ListSecurityCenterServicesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSecurityCenterServicesRequest parent. - * @member {string} parent - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @instance - */ - ListSecurityCenterServicesRequest.prototype.parent = ""; - - /** - * ListSecurityCenterServicesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @instance - */ - ListSecurityCenterServicesRequest.prototype.pageSize = 0; - - /** - * ListSecurityCenterServicesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @instance - */ - ListSecurityCenterServicesRequest.prototype.pageToken = ""; - - /** - * ListSecurityCenterServicesRequest showEligibleModulesOnly. - * @member {boolean} showEligibleModulesOnly - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @instance - */ - ListSecurityCenterServicesRequest.prototype.showEligibleModulesOnly = false; - - /** - * Creates a new ListSecurityCenterServicesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest instance - */ - ListSecurityCenterServicesRequest.create = function create(properties) { - return new ListSecurityCenterServicesRequest(properties); - }; - - /** - * Encodes the specified ListSecurityCenterServicesRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} message ListSecurityCenterServicesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityCenterServicesRequest.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.showEligibleModulesOnly != null && Object.hasOwnProperty.call(message, "showEligibleModulesOnly")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.showEligibleModulesOnly); - return writer; - }; - - /** - * Encodes the specified ListSecurityCenterServicesRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest} message ListSecurityCenterServicesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityCenterServicesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityCenterServicesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest(); - 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.showEligibleModulesOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListSecurityCenterServicesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityCenterServicesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSecurityCenterServicesRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSecurityCenterServicesRequest.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.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) - if (typeof message.showEligibleModulesOnly !== "boolean") - return "showEligibleModulesOnly: boolean expected"; - return null; - }; - - /** - * Creates a ListSecurityCenterServicesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} ListSecurityCenterServicesRequest - */ - ListSecurityCenterServicesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest(); - 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.showEligibleModulesOnly != null) - message.showEligibleModulesOnly = Boolean(object.showEligibleModulesOnly); - return message; - }; - - /** - * Creates a plain object from a ListSecurityCenterServicesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest} message ListSecurityCenterServicesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSecurityCenterServicesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.showEligibleModulesOnly = false; - } - 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.showEligibleModulesOnly != null && message.hasOwnProperty("showEligibleModulesOnly")) - object.showEligibleModulesOnly = message.showEligibleModulesOnly; - return object; - }; - - /** - * Converts this ListSecurityCenterServicesRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @instance - * @returns {Object.} JSON object - */ - ListSecurityCenterServicesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSecurityCenterServicesRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSecurityCenterServicesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest"; - }; - - return ListSecurityCenterServicesRequest; - })(); - - v1.ListSecurityCenterServicesResponse = (function() { - - /** - * Properties of a ListSecurityCenterServicesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IListSecurityCenterServicesResponse - * @property {Array.|null} [securityCenterServices] ListSecurityCenterServicesResponse securityCenterServices - * @property {string|null} [nextPageToken] ListSecurityCenterServicesResponse nextPageToken - */ - - /** - * Constructs a new ListSecurityCenterServicesResponse. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents a ListSecurityCenterServicesResponse. - * @implements IListSecurityCenterServicesResponse - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse=} [properties] Properties to set - */ - function ListSecurityCenterServicesResponse(properties) { - this.securityCenterServices = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSecurityCenterServicesResponse securityCenterServices. - * @member {Array.} securityCenterServices - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @instance - */ - ListSecurityCenterServicesResponse.prototype.securityCenterServices = $util.emptyArray; - - /** - * ListSecurityCenterServicesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @instance - */ - ListSecurityCenterServicesResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListSecurityCenterServicesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse instance - */ - ListSecurityCenterServicesResponse.create = function create(properties) { - return new ListSecurityCenterServicesResponse(properties); - }; - - /** - * Encodes the specified ListSecurityCenterServicesResponse message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse} message ListSecurityCenterServicesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityCenterServicesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securityCenterServices != null && message.securityCenterServices.length) - for (var i = 0; i < message.securityCenterServices.length; ++i) - $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.encode(message.securityCenterServices[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 ListSecurityCenterServicesResponse message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse} message ListSecurityCenterServicesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSecurityCenterServicesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityCenterServicesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.securityCenterServices && message.securityCenterServices.length)) - message.securityCenterServices = []; - message.securityCenterServices.push($root.google.cloud.securitycentermanagement.v1.SecurityCenterService.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListSecurityCenterServicesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSecurityCenterServicesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSecurityCenterServicesResponse message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSecurityCenterServicesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securityCenterServices != null && message.hasOwnProperty("securityCenterServices")) { - if (!Array.isArray(message.securityCenterServices)) - return "securityCenterServices: array expected"; - for (var i = 0; i < message.securityCenterServices.length; ++i) { - var error = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.verify(message.securityCenterServices[i]); - if (error) - return "securityCenterServices." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSecurityCenterServicesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} ListSecurityCenterServicesResponse - */ - ListSecurityCenterServicesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse(); - if (object.securityCenterServices) { - if (!Array.isArray(object.securityCenterServices)) - throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.securityCenterServices: array expected"); - message.securityCenterServices = []; - for (var i = 0; i < object.securityCenterServices.length; ++i) { - if (typeof object.securityCenterServices[i] !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse.securityCenterServices: object expected"); - message.securityCenterServices[i] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.fromObject(object.securityCenterServices[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListSecurityCenterServicesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse} message ListSecurityCenterServicesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSecurityCenterServicesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.securityCenterServices = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.securityCenterServices && message.securityCenterServices.length) { - object.securityCenterServices = []; - for (var j = 0; j < message.securityCenterServices.length; ++j) - object.securityCenterServices[j] = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.toObject(message.securityCenterServices[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSecurityCenterServicesResponse to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @instance - * @returns {Object.} JSON object - */ - ListSecurityCenterServicesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSecurityCenterServicesResponse - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSecurityCenterServicesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse"; - }; - - return ListSecurityCenterServicesResponse; - })(); - - v1.UpdateSecurityCenterServiceRequest = (function() { - - /** - * Properties of an UpdateSecurityCenterServiceRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @interface IUpdateSecurityCenterServiceRequest - * @property {google.cloud.securitycentermanagement.v1.ISecurityCenterService|null} [securityCenterService] UpdateSecurityCenterServiceRequest securityCenterService - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSecurityCenterServiceRequest updateMask - * @property {boolean|null} [validateOnly] UpdateSecurityCenterServiceRequest validateOnly - */ - - /** - * Constructs a new UpdateSecurityCenterServiceRequest. - * @memberof google.cloud.securitycentermanagement.v1 - * @classdesc Represents an UpdateSecurityCenterServiceRequest. - * @implements IUpdateSecurityCenterServiceRequest - * @constructor - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest=} [properties] Properties to set - */ - function UpdateSecurityCenterServiceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateSecurityCenterServiceRequest securityCenterService. - * @member {google.cloud.securitycentermanagement.v1.ISecurityCenterService|null|undefined} securityCenterService - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @instance - */ - UpdateSecurityCenterServiceRequest.prototype.securityCenterService = null; - - /** - * UpdateSecurityCenterServiceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @instance - */ - UpdateSecurityCenterServiceRequest.prototype.updateMask = null; - - /** - * UpdateSecurityCenterServiceRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @instance - */ - UpdateSecurityCenterServiceRequest.prototype.validateOnly = false; - - /** - * Creates a new UpdateSecurityCenterServiceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest=} [properties] Properties to set - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest instance - */ - UpdateSecurityCenterServiceRequest.create = function create(properties) { - return new UpdateSecurityCenterServiceRequest(properties); - }; - - /** - * Encodes the specified UpdateSecurityCenterServiceRequest message. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} message UpdateSecurityCenterServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecurityCenterServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.securityCenterService != null && Object.hasOwnProperty.call(message, "securityCenterService")) - $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.encode(message.securityCenterService, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.validateOnly); - return writer; - }; - - /** - * Encodes the specified UpdateSecurityCenterServiceRequest message, length delimited. Does not implicitly {@link google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest} message UpdateSecurityCenterServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSecurityCenterServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecurityCenterServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.securityCenterService = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateSecurityCenterServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSecurityCenterServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateSecurityCenterServiceRequest message. - * @function verify - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSecurityCenterServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.securityCenterService != null && message.hasOwnProperty("securityCenterService")) { - var error = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.verify(message.securityCenterService); - if (error) - return "securityCenterService." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - return null; - }; - - /** - * Creates an UpdateSecurityCenterServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} UpdateSecurityCenterServiceRequest - */ - UpdateSecurityCenterServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest) - return object; - var message = new $root.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest(); - if (object.securityCenterService != null) { - if (typeof object.securityCenterService !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.securityCenterService: object expected"); - message.securityCenterService = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.fromObject(object.securityCenterService); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from an UpdateSecurityCenterServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest} message UpdateSecurityCenterServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSecurityCenterServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.securityCenterService = null; - object.updateMask = null; - object.validateOnly = false; - } - if (message.securityCenterService != null && message.hasOwnProperty("securityCenterService")) - object.securityCenterService = $root.google.cloud.securitycentermanagement.v1.SecurityCenterService.toObject(message.securityCenterService, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this UpdateSecurityCenterServiceRequest to JSON. - * @function toJSON - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSecurityCenterServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateSecurityCenterServiceRequest - * @function getTypeUrl - * @memberof google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateSecurityCenterServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest"; - }; - - return UpdateSecurityCenterServiceRequest; - })(); - - return v1; - })(); - - return securitycentermanagement; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) - object.referenceDocsUri = ""; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.features = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.features = null; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.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; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Struct message. - * @function verify - * @memberof google.protobuf.Struct - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Struct.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fields != null && message.hasOwnProperty("fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]]); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Struct - * @function getTypeUrl - * @memberof google.protobuf.Struct - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Struct"; - }; - - return Struct; - })(); - - protobuf.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ - - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.nullValue = reader.int32(); - break; - } - case 2: { - message.numberValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 6: { - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.protobuf.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue); - if (error) - return "listValue." + error; - } - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - default: - if (typeof object.nullValue === "number") { - message.nullValue = object.nullValue; - break; - } - break; - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.protobuf.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Value"; - }; - - return Value; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); - - protobuf.ListValue = (function() { - - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ - - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; - - /** - * Creates a new ListValue instance using the specified properties. - * @function create - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListValue message. - * @function verify - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; - }; - - /** - * Converts this ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListValue - * @function getTypeUrl - * @memberof google.protobuf.ListValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ListValue"; - }; - - return ListValue; - })(); - - 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; - })(); - - return protobuf; - })(); - - google.iam = (function() { - - /** - * Namespace iam. - * @memberof google - * @namespace - */ - var iam = {}; - - iam.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.iam - * @namespace - */ - var v1 = {}; - - v1.Policy = (function() { - - /** - * Properties of a Policy. - * @memberof google.iam.v1 - * @interface IPolicy - * @property {number|null} [version] Policy version - * @property {Array.|null} [bindings] Policy bindings - * @property {Array.|null} [auditConfigs] Policy auditConfigs - * @property {Uint8Array|null} [etag] Policy etag - */ - - /** - * Constructs a new Policy. - * @memberof google.iam.v1 - * @classdesc Represents a Policy. - * @implements IPolicy - * @constructor - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - */ - function Policy(properties) { - this.bindings = []; - this.auditConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Policy version. - * @member {number} version - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.version = 0; - - /** - * Policy bindings. - * @member {Array.} bindings - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.bindings = $util.emptyArray; - - /** - * Policy auditConfigs. - * @member {Array.} auditConfigs - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.auditConfigs = $util.emptyArray; - - /** - * Policy etag. - * @member {Uint8Array} etag - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.etag = $util.newBuffer([]); - - /** - * Creates a new Policy instance using the specified properties. - * @function create - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - * @returns {google.iam.v1.Policy} Policy instance - */ - Policy.create = function create(properties) { - return new Policy(properties); - }; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.auditConfigs != null && message.auditConfigs.length) - for (var i = 0; i < message.auditConfigs.length; ++i) - $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.int32(); - break; - } - case 4: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.auditConfigs && message.auditConfigs.length)) - message.auditConfigs = []; - message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.etag = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Policy message. - * @function verify - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Policy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } - } - if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { - if (!Array.isArray(message.auditConfigs)) - return "auditConfigs: array expected"; - for (var i = 0; i < message.auditConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); - if (error) - return "auditConfigs." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) - return "etag: buffer expected"; - return null; - }; - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Policy} Policy - */ - Policy.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Policy) - return object; - var message = new $root.google.iam.v1.Policy(); - if (object.version != null) - message.version = object.version | 0; - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.iam.v1.Policy.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } - } - if (object.auditConfigs) { - if (!Array.isArray(object.auditConfigs)) - throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); - message.auditConfigs = []; - for (var i = 0; i < object.auditConfigs.length; ++i) { - if (typeof object.auditConfigs[i] !== "object") - throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); - message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); - } - } - if (object.etag != null) - if (typeof object.etag === "string") - $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length >= 0) - message.etag = object.etag; - return message; - }; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.Policy} message Policy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Policy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindings = []; - object.auditConfigs = []; - } - if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.etag = ""; - else { - object.etag = []; - if (options.bytes !== Array) - object.etag = $util.newBuffer(object.etag); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); - } - if (message.auditConfigs && message.auditConfigs.length) { - object.auditConfigs = []; - for (var j = 0; j < message.auditConfigs.length; ++j) - object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); - } - return object; - }; - - /** - * Converts this Policy to JSON. - * @function toJSON - * @memberof google.iam.v1.Policy - * @instance - * @returns {Object.} JSON object - */ - Policy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Policy - * @function getTypeUrl - * @memberof google.iam.v1.Policy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Policy"; - }; - - return Policy; - })(); - - v1.Binding = (function() { - - /** - * Properties of a Binding. - * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition - */ - - /** - * Constructs a new Binding. - * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.members = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; - - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.members = $util.emptyArray; - - /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.condition = null; - - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.role = reader.string(); - break; - } - case 2: { - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - } - case 3: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Binding message. - * @function verify - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) - return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; - } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.iam.v1.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.iam.v1.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Binding"; - }; - - return Binding; - })(); - - v1.AuditConfig = (function() { - - /** - * Properties of an AuditConfig. - * @memberof google.iam.v1 - * @interface IAuditConfig - * @property {string|null} [service] AuditConfig service - * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs - */ - - /** - * Constructs a new AuditConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfig. - * @implements IAuditConfig - * @constructor - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - */ - function AuditConfig(properties) { - this.auditLogConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfig service. - * @member {string} service - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.service = ""; - - /** - * AuditConfig auditLogConfigs. - * @member {Array.} auditLogConfigs - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.auditLogConfigs = $util.emptyArray; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfig} AuditConfig instance - */ - AuditConfig.create = function create(properties) { - return new AuditConfig(properties); - }; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.auditLogConfigs != null && message.auditLogConfigs.length) - for (var i = 0; i < message.auditLogConfigs.length; ++i) - $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - case 3: { - if (!(message.auditLogConfigs && message.auditLogConfigs.length)) - message.auditLogConfigs = []; - message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfig message. - * @function verify - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { - if (!Array.isArray(message.auditLogConfigs)) - return "auditLogConfigs: array expected"; - for (var i = 0; i < message.auditLogConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); - if (error) - return "auditLogConfigs." + error; - } - } - return null; - }; - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfig} AuditConfig - */ - AuditConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfig) - return object; - var message = new $root.google.iam.v1.AuditConfig(); - if (object.service != null) - message.service = String(object.service); - if (object.auditLogConfigs) { - if (!Array.isArray(object.auditLogConfigs)) - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); - message.auditLogConfigs = []; - for (var i = 0; i < object.auditLogConfigs.length; ++i) { - if (typeof object.auditLogConfigs[i] !== "object") - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); - message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.AuditConfig} message AuditConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.auditLogConfigs = []; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.auditLogConfigs && message.auditLogConfigs.length) { - object.auditLogConfigs = []; - for (var j = 0; j < message.auditLogConfigs.length; ++j) - object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); - } - return object; - }; - - /** - * Converts this AuditConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfig - * @instance - * @returns {Object.} JSON object - */ - AuditConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfig"; - }; - - return AuditConfig; - })(); - - v1.AuditLogConfig = (function() { - - /** - * Properties of an AuditLogConfig. - * @memberof google.iam.v1 - * @interface IAuditLogConfig - * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType - * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers - */ - - /** - * Constructs a new AuditLogConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditLogConfig. - * @implements IAuditLogConfig - * @constructor - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - */ - function AuditLogConfig(properties) { - this.exemptedMembers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditLogConfig logType. - * @member {google.iam.v1.AuditLogConfig.LogType} logType - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.logType = 0; - - /** - * AuditLogConfig exemptedMembers. - * @member {Array.} exemptedMembers - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance - */ - AuditLogConfig.create = function create(properties) { - return new AuditLogConfig(properties); - }; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); - if (message.exemptedMembers != null && message.exemptedMembers.length) - for (var i = 0; i < message.exemptedMembers.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); - return writer; - }; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.logType = reader.int32(); - break; - } - case 2: { - if (!(message.exemptedMembers && message.exemptedMembers.length)) - message.exemptedMembers = []; - message.exemptedMembers.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditLogConfig message. - * @function verify - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditLogConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - switch (message.logType) { - default: - return "logType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { - if (!Array.isArray(message.exemptedMembers)) - return "exemptedMembers: array expected"; - for (var i = 0; i < message.exemptedMembers.length; ++i) - if (!$util.isString(message.exemptedMembers[i])) - return "exemptedMembers: string[] expected"; - } - return null; - }; - - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - */ - AuditLogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditLogConfig) - return object; - var message = new $root.google.iam.v1.AuditLogConfig(); - switch (object.logType) { - default: - if (typeof object.logType === "number") { - message.logType = object.logType; - break; - } - break; - case "LOG_TYPE_UNSPECIFIED": - case 0: - message.logType = 0; - break; - case "ADMIN_READ": - case 1: - message.logType = 1; - break; - case "DATA_WRITE": - case 2: - message.logType = 2; - break; - case "DATA_READ": - case 3: - message.logType = 3; - break; - } - if (object.exemptedMembers) { - if (!Array.isArray(object.exemptedMembers)) - throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); - message.exemptedMembers = []; - for (var i = 0; i < object.exemptedMembers.length; ++i) - message.exemptedMembers[i] = String(object.exemptedMembers[i]); - } - return message; - }; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditLogConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exemptedMembers = []; - if (options.defaults) - object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; - if (message.exemptedMembers && message.exemptedMembers.length) { - object.exemptedMembers = []; - for (var j = 0; j < message.exemptedMembers.length; ++j) - object.exemptedMembers[j] = message.exemptedMembers[j]; - } - return object; - }; - - /** - * Converts this AuditLogConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditLogConfig - * @instance - * @returns {Object.} JSON object - */ - AuditLogConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditLogConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; - }; - - /** - * LogType enum. - * @name google.iam.v1.AuditLogConfig.LogType - * @enum {number} - * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value - * @property {number} ADMIN_READ=1 ADMIN_READ value - * @property {number} DATA_WRITE=2 DATA_WRITE value - * @property {number} DATA_READ=3 DATA_READ value - */ - AuditLogConfig.LogType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADMIN_READ"] = 1; - values[valuesById[2] = "DATA_WRITE"] = 2; - values[valuesById[3] = "DATA_READ"] = 3; - return values; - })(); - - return AuditLogConfig; - })(); - - v1.PolicyDelta = (function() { - - /** - * Properties of a PolicyDelta. - * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas - * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas - */ - - /** - * Constructs a new PolicyDelta. - * @memberof google.iam.v1 - * @classdesc Represents a PolicyDelta. - * @implements IPolicyDelta - * @constructor - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - */ - function PolicyDelta(properties) { - this.bindingDeltas = []; - this.auditConfigDeltas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyDelta bindingDeltas. - * @member {Array.} bindingDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.bindingDeltas = $util.emptyArray; - - /** - * PolicyDelta auditConfigDeltas. - * @member {Array.} auditConfigDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance - */ - PolicyDelta.create = function create(properties) { - return new PolicyDelta(properties); - }; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bindingDeltas != null && message.bindingDeltas.length) - for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) - for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyDelta message. - * @function verify - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { - if (!Array.isArray(message.bindingDeltas)) - return "bindingDeltas: array expected"; - for (var i = 0; i < message.bindingDeltas.length; ++i) { - var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { - if (!Array.isArray(message.auditConfigDeltas)) - return "auditConfigDeltas: array expected"; - for (var i = 0; i < message.auditConfigDeltas.length; ++i) { - var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); - if (error) - return "auditConfigDeltas." + error; - } - } - return null; - }; - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - */ - PolicyDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.PolicyDelta) - return object; - var message = new $root.google.iam.v1.PolicyDelta(); - if (object.bindingDeltas) { - if (!Array.isArray(object.bindingDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); - message.bindingDeltas = []; - for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - if (object.auditConfigDeltas) { - if (!Array.isArray(object.auditConfigDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); - message.auditConfigDeltas = []; - for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.PolicyDelta} message PolicyDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindingDeltas = []; - object.auditConfigDeltas = []; - } - if (message.bindingDeltas && message.bindingDeltas.length) { - object.bindingDeltas = []; - for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); - } - if (message.auditConfigDeltas && message.auditConfigDeltas.length) { - object.auditConfigDeltas = []; - for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); - } - return object; - }; - - /** - * Converts this PolicyDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.PolicyDelta - * @instance - * @returns {Object.} JSON object - */ - PolicyDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyDelta - * @function getTypeUrl - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; - }; - - return PolicyDelta; - })(); - - v1.BindingDelta = (function() { - - /** - * Properties of a BindingDelta. - * @memberof google.iam.v1 - * @interface IBindingDelta - * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action - * @property {string|null} [role] BindingDelta role - * @property {string|null} [member] BindingDelta member - * @property {google.type.IExpr|null} [condition] BindingDelta condition - */ - - /** - * Constructs a new BindingDelta. - * @memberof google.iam.v1 - * @classdesc Represents a BindingDelta. - * @implements IBindingDelta - * @constructor - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - */ - function BindingDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BindingDelta action. - * @member {google.iam.v1.BindingDelta.Action} action - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.action = 0; - - /** - * BindingDelta role. - * @member {string} role - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.role = ""; - - /** - * BindingDelta member. - * @member {string} member - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.member = ""; - - /** - * BindingDelta condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.condition = null; - - /** - * Creates a new BindingDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - * @returns {google.iam.v1.BindingDelta} BindingDelta instance - */ - BindingDelta.create = function create(properties) { - return new BindingDelta(properties); - }; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.role = reader.string(); - break; - } - case 3: { - message.member = reader.string(); - break; - } - case 4: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BindingDelta message. - * @function verify - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BindingDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.BindingDelta} BindingDelta - */ - BindingDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - var message = new $root.google.iam.v1.BindingDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.BindingDelta} message BindingDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BindingDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this BindingDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.BindingDelta - * @instance - * @returns {Object.} JSON object - */ - BindingDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BindingDelta - * @function getTypeUrl - * @memberof google.iam.v1.BindingDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.BindingDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.BindingDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - BindingDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return BindingDelta; - })(); - - v1.AuditConfigDelta = (function() { - - /** - * Properties of an AuditConfigDelta. - * @memberof google.iam.v1 - * @interface IAuditConfigDelta - * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action - * @property {string|null} [service] AuditConfigDelta service - * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember - * @property {string|null} [logType] AuditConfigDelta logType - */ - - /** - * Constructs a new AuditConfigDelta. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfigDelta. - * @implements IAuditConfigDelta - * @constructor - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - */ - function AuditConfigDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfigDelta action. - * @member {google.iam.v1.AuditConfigDelta.Action} action - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.action = 0; - - /** - * AuditConfigDelta service. - * @member {string} service - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.service = ""; - - /** - * AuditConfigDelta exemptedMember. - * @member {string} exemptedMember - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.exemptedMember = ""; - - /** - * AuditConfigDelta logType. - * @member {string} logType - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.logType = ""; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance - */ - AuditConfigDelta.create = function create(properties) { - return new AuditConfigDelta(properties); - }; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); - return writer; - }; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.exemptedMember = reader.string(); - break; - } - case 4: { - message.logType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfigDelta message. - * @function verify - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfigDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - if (!$util.isString(message.logType)) - return "logType: string expected"; - return null; - }; - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - */ - AuditConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) - return object; - var message = new $root.google.iam.v1.AuditConfigDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.service != null) - message.service = String(object.service); - if (object.exemptedMember != null) - message.exemptedMember = String(object.exemptedMember); - if (object.logType != null) - message.logType = String(object.logType); - return message; - }; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = message.logType; - return object; - }; - - /** - * Converts this AuditConfigDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfigDelta - * @instance - * @returns {Object.} JSON object - */ - AuditConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfigDelta - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.AuditConfigDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - AuditConfigDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return AuditConfigDelta; - })(); - - return v1; - })(); - - return iam; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Expr = (function() { - - /** - * Properties of an Expr. - * @memberof google.type - * @interface IExpr - * @property {string|null} [expression] Expr expression - * @property {string|null} [title] Expr title - * @property {string|null} [description] Expr description - * @property {string|null} [location] Expr location - */ - - /** - * Constructs a new Expr. - * @memberof google.type - * @classdesc Represents an Expr. - * @implements IExpr - * @constructor - * @param {google.type.IExpr=} [properties] Properties to set - */ - function Expr(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Expr expression. - * @member {string} expression - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.expression = ""; - - /** - * Expr title. - * @member {string} title - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.title = ""; - - /** - * Expr description. - * @member {string} description - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.description = ""; - - /** - * Expr location. - * @member {string} location - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.location = ""; - - /** - * Creates a new Expr instance using the specified properties. - * @function create - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr=} [properties] Properties to set - * @returns {google.type.Expr} Expr instance - */ - Expr.create = function create(properties) { - return new Expr(properties); - }; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encode - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - return writer; - }; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @function decode - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.expression = reader.string(); - break; - } - case 2: { - message.title = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Expr message. - * @function verify - * @memberof google.type.Expr - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Expr.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates an Expr message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Expr - * @static - * @param {Object.} object Plain object - * @returns {google.type.Expr} Expr - */ - Expr.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Expr) - return object; - var message = new $root.google.type.Expr(); - if (object.expression != null) - message.expression = String(object.expression); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Expr - * @static - * @param {google.type.Expr} message Expr - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Expr.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.expression = ""; - object.title = ""; - object.description = ""; - object.location = ""; - } - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this Expr to JSON. - * @function toJSON - * @memberof google.type.Expr - * @instance - * @returns {Object.} JSON object - */ - Expr.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Expr - * @function getTypeUrl - * @memberof google.type.Expr - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Expr"; - }; - - return Expr; - })(); - - return type; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { - - /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details - */ - - /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set - */ - function Status(properties) { - this.details = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.message = ""; - - /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.details = $util.emptyArray; - - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - - /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encode - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - if (message.details != null && message.details.length) - for (var i = 0; i < message.details.length; ++i) - $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Status - * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.code = reader.int32(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - case 3: { - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Status message. - * @function verify - * @memberof google.rpc.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - if (!Array.isArray(message.details)) - return "details: array expected"; - for (var i = 0; i < message.details.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.details[i]); - if (error) - return "details." + error; - } - } - return null; - }; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Status - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) - return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Status - * @static - * @param {google.rpc.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.details = []; - if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); - } - return object; - }; - - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof google.rpc.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof google.rpc.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Status"; - }; - - return Status; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json deleted file mode 100644 index c4c35cb2721..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/protos/protos.json +++ /dev/null @@ -1,3971 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "securitycentermanagement": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.SecurityCenterManagement.V1", - "go_package": "cloud.google.com/go/securitycentermanagement/apiv1/securitycentermanagementpb;securitycentermanagementpb", - "java_multiple_files": true, - "java_outer_classname": "SecurityCenterManagementProto", - "java_package": "com.google.cloud.securitycentermanagement.v1", - "php_namespace": "Google\\Cloud\\SecurityCenterManagement\\V1", - "ruby_package": "Google::Cloud::SecurityCenterManagement::V1", - "(google.api.resource_definition).type": "securitycentermanagement.googleapis.com/FolderLocation", - "(google.api.resource_definition).pattern": "folders/{folder}/locations/{location}" - }, - "nested": { - "SecurityCenterManagement": { - "options": { - "(google.api.default_host)": "securitycentermanagement.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "requestType": "ListEffectiveSecurityHealthAnalyticsCustomModulesRequest", - "responseType": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules", - "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" - }, - { - "get": "/v1/{parent=organizations/*/locations/*}/effectiveSecurityHealthAnalyticsCustomModules" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "requestType": "GetEffectiveSecurityHealthAnalyticsCustomModuleRequest", - "responseType": "EffectiveSecurityHealthAnalyticsCustomModule", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" - }, - { - "get": "/v1/{name=organizations/*/locations/*/effectiveSecurityHealthAnalyticsCustomModules/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListSecurityHealthAnalyticsCustomModules": { - "requestType": "ListSecurityHealthAnalyticsCustomModulesRequest", - "responseType": "ListSecurityHealthAnalyticsCustomModulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", - "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules" - }, - { - "get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "requestType": "ListDescendantSecurityHealthAnalyticsCustomModulesRequest", - "responseType": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant", - "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" - }, - { - "get": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:listDescendant" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetSecurityHealthAnalyticsCustomModule": { - "requestType": "GetSecurityHealthAnalyticsCustomModuleRequest", - "responseType": "SecurityHealthAnalyticsCustomModule", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" - }, - { - "get": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "requestType": "CreateSecurityHealthAnalyticsCustomModuleRequest", - "responseType": "SecurityHealthAnalyticsCustomModule", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", - "(google.api.http).body": "security_health_analytics_custom_module", - "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules", - "(google.api.http).additional_bindings.body": "security_health_analytics_custom_module", - "(google.api.method_signature)": "parent,security_health_analytics_custom_module" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules", - "body": "security_health_analytics_custom_module", - "additional_bindings": [ - { - "post": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules", - "body": "security_health_analytics_custom_module" - }, - { - "post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules", - "body": "security_health_analytics_custom_module" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,security_health_analytics_custom_module" - } - ] - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "requestType": "UpdateSecurityHealthAnalyticsCustomModuleRequest", - "responseType": "SecurityHealthAnalyticsCustomModule", - "options": { - "(google.api.http).patch": "/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "(google.api.http).body": "security_health_analytics_custom_module", - "(google.api.http).additional_bindings.patch": "/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "(google.api.http).additional_bindings.body": "security_health_analytics_custom_module", - "(google.api.method_signature)": "security_health_analytics_custom_module,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{security_health_analytics_custom_module.name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "body": "security_health_analytics_custom_module", - "additional_bindings": [ - { - "patch": "/v1/{security_health_analytics_custom_module.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "body": "security_health_analytics_custom_module" - }, - { - "patch": "/v1/{security_health_analytics_custom_module.name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "body": "security_health_analytics_custom_module" - } - ] - } - }, - { - "(google.api.method_signature)": "security_health_analytics_custom_module,update_mask" - } - ] - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "requestType": "DeleteSecurityHealthAnalyticsCustomModuleRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/securityHealthAnalyticsCustomModules/*}", - "additional_bindings": [ - { - "delete": "/v1/{name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}" - }, - { - "delete": "/v1/{name=organizations/*/locations/*/securityHealthAnalyticsCustomModules/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "requestType": "SimulateSecurityHealthAnalyticsCustomModuleRequest", - "responseType": "SimulateSecurityHealthAnalyticsCustomModuleResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", - "(google.api.http).additional_bindings.body": "*", - "(google.api.method_signature)": "parent,custom_config,resource" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", - "body": "*", - "additional_bindings": [ - { - "post": "/v1/{parent=folders/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", - "body": "*" - }, - { - "post": "/v1/{parent=organizations/*/locations/*}/securityHealthAnalyticsCustomModules:simulate", - "body": "*" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,custom_config,resource" - } - ] - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "requestType": "ListEffectiveEventThreatDetectionCustomModulesRequest", - "responseType": "ListEffectiveEventThreatDetectionCustomModulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules", - "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/effectiveEventThreatDetectionCustomModules", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/effectiveEventThreatDetectionCustomModules" - }, - { - "get": "/v1/{parent=organizations/*/locations/*}/effectiveEventThreatDetectionCustomModules" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "requestType": "GetEffectiveEventThreatDetectionCustomModuleRequest", - "responseType": "EffectiveEventThreatDetectionCustomModule", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/effectiveEventThreatDetectionCustomModules/*}", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" - }, - { - "get": "/v1/{name=organizations/*/locations/*/effectiveEventThreatDetectionCustomModules/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListEventThreatDetectionCustomModules": { - "requestType": "ListEventThreatDetectionCustomModulesRequest", - "responseType": "ListEventThreatDetectionCustomModulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", - "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules" - }, - { - "get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "ListDescendantEventThreatDetectionCustomModules": { - "requestType": "ListDescendantEventThreatDetectionCustomModulesRequest", - "responseType": "ListDescendantEventThreatDetectionCustomModulesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant", - "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:listDescendant", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" - }, - { - "get": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:listDescendant" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetEventThreatDetectionCustomModule": { - "requestType": "GetEventThreatDetectionCustomModuleRequest", - "responseType": "EventThreatDetectionCustomModule", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" - }, - { - "get": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateEventThreatDetectionCustomModule": { - "requestType": "CreateEventThreatDetectionCustomModuleRequest", - "responseType": "EventThreatDetectionCustomModule", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", - "(google.api.http).body": "event_threat_detection_custom_module", - "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules", - "(google.api.http).additional_bindings.body": "event_threat_detection_custom_module", - "(google.api.method_signature)": "parent,event_threat_detection_custom_module" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules", - "body": "event_threat_detection_custom_module", - "additional_bindings": [ - { - "post": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules", - "body": "event_threat_detection_custom_module" - }, - { - "post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules", - "body": "event_threat_detection_custom_module" - } - ] - } - }, - { - "(google.api.method_signature)": "parent,event_threat_detection_custom_module" - } - ] - }, - "UpdateEventThreatDetectionCustomModule": { - "requestType": "UpdateEventThreatDetectionCustomModuleRequest", - "responseType": "EventThreatDetectionCustomModule", - "options": { - "(google.api.http).patch": "/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", - "(google.api.http).body": "event_threat_detection_custom_module", - "(google.api.http).additional_bindings.patch": "/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", - "(google.api.http).additional_bindings.body": "event_threat_detection_custom_module", - "(google.api.method_signature)": "event_threat_detection_custom_module,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{event_threat_detection_custom_module.name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", - "body": "event_threat_detection_custom_module", - "additional_bindings": [ - { - "patch": "/v1/{event_threat_detection_custom_module.name=folders/*/locations/*/eventThreatDetectionCustomModules/*}", - "body": "event_threat_detection_custom_module" - }, - { - "patch": "/v1/{event_threat_detection_custom_module.name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", - "body": "event_threat_detection_custom_module" - } - ] - } - }, - { - "(google.api.method_signature)": "event_threat_detection_custom_module,update_mask" - } - ] - }, - "DeleteEventThreatDetectionCustomModule": { - "requestType": "DeleteEventThreatDetectionCustomModuleRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", - "(google.api.http).additional_bindings.delete": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/eventThreatDetectionCustomModules/*}", - "additional_bindings": [ - { - "delete": "/v1/{name=folders/*/locations/*/eventThreatDetectionCustomModules/*}" - }, - { - "delete": "/v1/{name=organizations/*/locations/*/eventThreatDetectionCustomModules/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ValidateEventThreatDetectionCustomModule": { - "requestType": "ValidateEventThreatDetectionCustomModuleRequest", - "responseType": "ValidateEventThreatDetectionCustomModuleResponse", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate", - "(google.api.http).body": "*", - "(google.api.http).additional_bindings.post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate", - "(google.api.http).additional_bindings.body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/eventThreatDetectionCustomModules:validate", - "body": "*", - "additional_bindings": [ - { - "post": "/v1/{parent=folders/*/locations/*}/eventThreatDetectionCustomModules:validate", - "body": "*" - }, - { - "post": "/v1/{parent=organizations/*/locations/*}/eventThreatDetectionCustomModules:validate", - "body": "*" - } - ] - } - } - ] - }, - "GetSecurityCenterService": { - "requestType": "GetSecurityCenterServiceRequest", - "responseType": "SecurityCenterService", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/securityCenterServices/*}", - "(google.api.http).additional_bindings.get": "/v1/{name=organizations/*/locations/*/securityCenterServices/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/securityCenterServices/*}", - "additional_bindings": [ - { - "get": "/v1/{name=folders/*/locations/*/securityCenterServices/*}" - }, - { - "get": "/v1/{name=organizations/*/locations/*/securityCenterServices/*}" - } - ] - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListSecurityCenterServices": { - "requestType": "ListSecurityCenterServicesRequest", - "responseType": "ListSecurityCenterServicesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/securityCenterServices", - "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/securityCenterServices", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/securityCenterServices", - "additional_bindings": [ - { - "get": "/v1/{parent=folders/*/locations/*}/securityCenterServices" - }, - { - "get": "/v1/{parent=organizations/*/locations/*}/securityCenterServices" - } - ] - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateSecurityCenterService": { - "requestType": "UpdateSecurityCenterServiceRequest", - "responseType": "SecurityCenterService", - "options": { - "(google.api.http).patch": "/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}", - "(google.api.http).body": "security_center_service", - "(google.api.http).additional_bindings.patch": "/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}", - "(google.api.http).additional_bindings.body": "security_center_service", - "(google.api.method_signature)": "security_center_service,update_mask" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{security_center_service.name=projects/*/locations/*/securityCenterServices/*}", - "body": "security_center_service", - "additional_bindings": [ - { - "patch": "/v1/{security_center_service.name=folders/*/locations/*/securityCenterServices/*}", - "body": "security_center_service" - }, - { - "patch": "/v1/{security_center_service.name=organizations/*/locations/*/securityCenterServices/*}", - "body": "security_center_service" - } - ] - } - }, - { - "(google.api.method_signature)": "security_center_service,update_mask" - } - ] - } - } - }, - "SecurityCenterService": { - "options": { - "(google.api.resource).type": "securitycentermanagement.googleapis.com/SecurityCenterService", - "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/securityCenterServices/{service}", - "(google.api.resource).plural": "securityCenterServices", - "(google.api.resource).singular": "securityCenterService" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "intendedEnablementState": { - "type": "EnablementState", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "effectiveEnablementState": { - "type": "EnablementState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "modules": { - "keyType": "string", - "type": "ModuleSettings", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceConfig": { - "type": "google.protobuf.Struct", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "ModuleSettings": { - "fields": { - "intendedEnablementState": { - "type": "EnablementState", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "effectiveEnablementState": { - "type": "EnablementState", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "EnablementState": { - "values": { - "ENABLEMENT_STATE_UNSPECIFIED": 0, - "INHERITED": 1, - "ENABLED": 2, - "DISABLED": 3, - "INGEST_ONLY": 4 - } - } - } - }, - "EffectiveSecurityHealthAnalyticsCustomModule": { - "options": { - "(google.api.resource).type": "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule", - "(google.api.resource).pattern": "folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}", - "(google.api.resource).plural": "effectiveSecurityHealthAnalyticsCustomModules", - "(google.api.resource).singular": "effectiveSecurityHealthAnalyticsCustomModule" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "customConfig": { - "type": "CustomConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enablementState": { - "type": "EnablementState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "EnablementState": { - "values": { - "ENABLEMENT_STATE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2 - } - } - } - }, - "ListEffectiveSecurityHealthAnalyticsCustomModulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse": { - "fields": { - "effectiveSecurityHealthAnalyticsCustomModules": { - "rule": "repeated", - "type": "EffectiveSecurityHealthAnalyticsCustomModule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetEffectiveSecurityHealthAnalyticsCustomModuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" - } - } - } - }, - "SecurityHealthAnalyticsCustomModule": { - "options": { - "(google.api.resource).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule", - "(google.api.resource).pattern": "folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}", - "(google.api.resource).plural": "securityHealthAnalyticsCustomModules", - "(google.api.resource).singular": "securityHealthAnalyticsCustomModule" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "displayName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enablementState": { - "type": "EnablementState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastEditor": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "ancestorModule": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - }, - "customConfig": { - "type": "CustomConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EnablementState": { - "values": { - "ENABLEMENT_STATE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2, - "INHERITED": 3 - } - } - } - }, - "CustomConfig": { - "fields": { - "predicate": { - "type": "google.type.Expr", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "customOutput": { - "type": "CustomOutputSpec", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resourceSelector": { - "type": "ResourceSelector", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "severity": { - "type": "Severity", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "recommendation": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "CustomOutputSpec": { - "fields": { - "properties": { - "rule": "repeated", - "type": "Property", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Property": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "valueExpression": { - "type": "google.type.Expr", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "ResourceSelector": { - "fields": { - "resourceTypes": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Severity": { - "values": { - "SEVERITY_UNSPECIFIED": 0, - "CRITICAL": 1, - "HIGH": 2, - "MEDIUM": 3, - "LOW": 4 - } - } - } - }, - "ListSecurityHealthAnalyticsCustomModulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListSecurityHealthAnalyticsCustomModulesResponse": { - "fields": { - "securityHealthAnalyticsCustomModules": { - "rule": "repeated", - "type": "SecurityHealthAnalyticsCustomModule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListDescendantSecurityHealthAnalyticsCustomModulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDescendantSecurityHealthAnalyticsCustomModulesResponse": { - "fields": { - "securityHealthAnalyticsCustomModules": { - "rule": "repeated", - "type": "SecurityHealthAnalyticsCustomModule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetSecurityHealthAnalyticsCustomModuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - } - } - }, - "CreateSecurityHealthAnalyticsCustomModuleRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - }, - "securityHealthAnalyticsCustomModule": { - "type": "SecurityHealthAnalyticsCustomModule", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateSecurityHealthAnalyticsCustomModuleRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "securityHealthAnalyticsCustomModule": { - "type": "SecurityHealthAnalyticsCustomModule", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteSecurityHealthAnalyticsCustomModuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" - } - }, - "validateOnly": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SimulateSecurityHealthAnalyticsCustomModuleRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "customConfig": { - "type": "CustomConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "SimulatedResource", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "SimulatedResource": { - "fields": { - "resourceType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resourceData": { - "type": "google.protobuf.Struct", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "iamPolicyData": { - "type": "google.iam.v1.Policy", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "SimulatedFinding": { - "options": { - "(google.api.resource).type": "securitycenter.googleapis.com/Finding", - "(google.api.resource).pattern": "projects/{project}/sources/{source}/findings/{finding}", - "(google.api.resource).plural": "findings", - "(google.api.resource).singular": "finding" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "parent": { - "type": "string", - "id": 2 - }, - "resourceName": { - "type": "string", - "id": 3 - }, - "category": { - "type": "string", - "id": 4 - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "sourceProperties": { - "keyType": "string", - "type": "google.protobuf.Value", - "id": 6 - }, - "eventTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "severity": { - "type": "Severity", - "id": 8 - }, - "findingClass": { - "type": "FindingClass", - "id": 9 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "INACTIVE": 2 - } - }, - "Severity": { - "values": { - "SEVERITY_UNSPECIFIED": 0, - "CRITICAL": 1, - "HIGH": 2, - "MEDIUM": 3, - "LOW": 4 - } - }, - "FindingClass": { - "values": { - "FINDING_CLASS_UNSPECIFIED": 0, - "THREAT": 1, - "VULNERABILITY": 2, - "MISCONFIGURATION": 3, - "OBSERVATION": 4, - "SCC_ERROR": 5, - "POSTURE_VIOLATION": 6, - "TOXIC_COMBINATION": 7 - } - } - } - }, - "SimulateSecurityHealthAnalyticsCustomModuleResponse": { - "fields": { - "result": { - "type": "SimulatedResult", - "id": 1 - } - }, - "nested": { - "SimulatedResult": { - "oneofs": { - "result": { - "oneof": [ - "finding", - "noViolation", - "error" - ] - } - }, - "fields": { - "finding": { - "type": "SimulatedFinding", - "id": 1 - }, - "noViolation": { - "type": "google.protobuf.Empty", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - } - } - } - } - }, - "EffectiveEventThreatDetectionCustomModule": { - "options": { - "(google.api.resource).type": "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule", - "(google.api.resource).pattern": "folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}", - "(google.api.resource).plural": "effectiveEventThreatDetectionCustomModules", - "(google.api.resource).singular": "effectiveEventThreatDetectionCustomModule" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "config": { - "type": "google.protobuf.Struct", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enablementState": { - "type": "EnablementState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "type": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "displayName": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "description": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "EnablementState": { - "values": { - "ENABLEMENT_STATE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2 - } - } - } - }, - "ListEffectiveEventThreatDetectionCustomModulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEffectiveEventThreatDetectionCustomModulesResponse": { - "fields": { - "effectiveEventThreatDetectionCustomModules": { - "rule": "repeated", - "type": "EffectiveEventThreatDetectionCustomModule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetEffectiveEventThreatDetectionCustomModuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" - } - } - } - }, - "EventThreatDetectionCustomModule": { - "options": { - "(google.api.resource).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule", - "(google.api.resource).pattern": "folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}", - "(google.api.resource).plural": "eventThreatDetectionCustomModules", - "(google.api.resource).singular": "eventThreatDetectionCustomModule" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "config": { - "type": "google.protobuf.Struct", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ancestorModule": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - }, - "enablementState": { - "type": "EnablementState", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "type": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayName": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "description": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastEditor": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "EnablementState": { - "values": { - "ENABLEMENT_STATE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2, - "INHERITED": 3 - } - } - } - }, - "ListEventThreatDetectionCustomModulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListEventThreatDetectionCustomModulesResponse": { - "fields": { - "eventThreatDetectionCustomModules": { - "rule": "repeated", - "type": "EventThreatDetectionCustomModule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListDescendantEventThreatDetectionCustomModulesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDescendantEventThreatDetectionCustomModulesResponse": { - "fields": { - "eventThreatDetectionCustomModules": { - "rule": "repeated", - "type": "EventThreatDetectionCustomModule", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetEventThreatDetectionCustomModuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - } - } - }, - "CreateEventThreatDetectionCustomModuleRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - }, - "eventThreatDetectionCustomModule": { - "type": "EventThreatDetectionCustomModule", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateEventThreatDetectionCustomModuleRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "eventThreatDetectionCustomModule": { - "type": "EventThreatDetectionCustomModule", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteEventThreatDetectionCustomModuleRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - }, - "validateOnly": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ValidateEventThreatDetectionCustomModuleRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" - } - }, - "rawText": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "type": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ValidateEventThreatDetectionCustomModuleResponse": { - "fields": { - "errors": { - "rule": "repeated", - "type": "CustomModuleValidationError", - "id": 2 - } - }, - "nested": { - "CustomModuleValidationError": { - "oneofs": { - "_start": { - "oneof": [ - "start" - ] - }, - "_end": { - "oneof": [ - "end" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "fieldPath": { - "type": "string", - "id": 2 - }, - "start": { - "type": "Position", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "end": { - "type": "Position", - "id": 4, - "options": { - "proto3_optional": true - } - } - } - }, - "Position": { - "fields": { - "lineNumber": { - "type": "int32", - "id": 1 - }, - "columnNumber": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "GetSecurityCenterServiceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "securitycentermanagement.googleapis.com/SecurityCenterService" - } - }, - "showEligibleModulesOnly": { - "type": "bool", - "id": 2 - } - } - }, - "ListSecurityCenterServicesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "securitycentermanagement.googleapis.com/SecurityCenterService" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "showEligibleModulesOnly": { - "type": "bool", - "id": 4 - } - } - }, - "ListSecurityCenterServicesResponse": { - "fields": { - "securityCenterServices": { - "rule": "repeated", - "type": "SecurityCenterService", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UpdateSecurityCenterServiceRequest": { - "fields": { - "securityCenterService": { - "type": "SecurityCenterService", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "validateOnly": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19, - "options": { - "packed": false - } - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - } - } - }, - "OneofOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - } - }, - "extensions": [ - [ - 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - } - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - } - } - }, - "FeatureSetDefaults": { - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "features": { - "type": "FeatureSet", - "id": 2 - } - } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Struct": { - "fields": { - "fields": { - "keyType": "string", - "type": "Value", - "id": 1 - } - } - }, - "Value": { - "oneofs": { - "kind": { - "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" - ] - } - }, - "fields": { - "nullValue": { - "type": "NullValue", - "id": 1 - }, - "numberValue": { - "type": "double", - "id": 2 - }, - "stringValue": { - "type": "string", - "id": 3 - }, - "boolValue": { - "type": "bool", - "id": 4 - }, - "structValue": { - "type": "Struct", - "id": 5 - }, - "listValue": { - "type": "ListValue", - "id": 6 - } - } - }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { - "fields": { - "values": { - "rule": "repeated", - "type": "Value", - "id": 1 - } - } - }, - "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 - } - } - } - } - }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Iam.V1", - "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", - "java_multiple_files": true, - "java_outer_classname": "PolicyProto", - "java_package": "com.google.iam.v1", - "php_namespace": "Google\\Cloud\\Iam\\V1" - }, - "nested": { - "Policy": { - "fields": { - "version": { - "type": "int32", - "id": 1 - }, - "bindings": { - "rule": "repeated", - "type": "Binding", - "id": 4 - }, - "auditConfigs": { - "rule": "repeated", - "type": "AuditConfig", - "id": 6 - }, - "etag": { - "type": "bytes", - "id": 3 - } - } - }, - "Binding": { - "fields": { - "role": { - "type": "string", - "id": 1 - }, - "members": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "condition": { - "type": "google.type.Expr", - "id": 3 - } - } - }, - "AuditConfig": { - "fields": { - "service": { - "type": "string", - "id": 1 - }, - "auditLogConfigs": { - "rule": "repeated", - "type": "AuditLogConfig", - "id": 3 - } - } - }, - "AuditLogConfig": { - "fields": { - "logType": { - "type": "LogType", - "id": 1 - }, - "exemptedMembers": { - "rule": "repeated", - "type": "string", - "id": 2 - } - }, - "nested": { - "LogType": { - "values": { - "LOG_TYPE_UNSPECIFIED": 0, - "ADMIN_READ": 1, - "DATA_WRITE": 2, - "DATA_READ": 3 - } - } - } - }, - "PolicyDelta": { - "fields": { - "bindingDeltas": { - "rule": "repeated", - "type": "BindingDelta", - "id": 1 - }, - "auditConfigDeltas": { - "rule": "repeated", - "type": "AuditConfigDelta", - "id": 2 - } - } - }, - "BindingDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "role": { - "type": "string", - "id": 2 - }, - "member": { - "type": "string", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "AuditConfigDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "service": { - "type": "string", - "id": 2 - }, - "exemptedMember": { - "type": "string", - "id": 3 - }, - "logType": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - } - } - } - } - }, - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", - "java_multiple_files": true, - "java_outer_classname": "ExprProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Expr": { - "fields": { - "expression": { - "type": "string", - "id": 1 - }, - "title": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "location": { - "type": "string", - "id": 4 - } - } - } - } - }, - "rpc": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js deleted file mode 100644 index 6609ecee720..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js +++ /dev/null @@ -1,84 +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, eventThreatDetectionCustomModule) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of parent for the module, in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The module to create. The - * EventThreatDetectionCustomModule.name google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name - * field is ignored; Security Command Center generates the name. - */ - // const eventThreatDetectionCustomModule = {} - /** - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be created. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * If the request is valid, a subsequent request to create the module could - * still fail for one of the following reasons: - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * Defaults to `false`. - */ - // const validateOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callCreateEventThreatDetectionCustomModule() { - // Construct request - const request = { - parent, - eventThreatDetectionCustomModule, - }; - - // Run request - const response = await securitycentermanagementClient.createEventThreatDetectionCustomModule(request); - console.log(response); - } - - callCreateEventThreatDetectionCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js deleted file mode 100644 index 5c6e5cfb7ab..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.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, securityHealthAnalyticsCustomModule) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the parent organization, folder, or project of the - * module, in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The resource being created. - */ - // const securityHealthAnalyticsCustomModule = {} - /** - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be created. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * If the request is valid, a subsequent request to create the module could - * still fail for one of the following reasons: - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * Defaults to `false`. - */ - // const validateOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callCreateSecurityHealthAnalyticsCustomModule() { - // Construct request - const request = { - parent, - securityHealthAnalyticsCustomModule, - }; - - // Run request - const response = await securitycentermanagementClient.createSecurityHealthAnalyticsCustomModule(request); - console.log(response); - } - - callCreateSecurityHealthAnalyticsCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js deleted file mode 100644 index cfffc386d9c..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js +++ /dev/null @@ -1,78 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Event Threat Detection custom module, in - * one of the following formats: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - */ - // const name = 'abc123' - /** - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be deleted. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * If the request is valid, a subsequent request to delete the module could - * still fail for one of the following reasons: - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * Defaults to `false`. - */ - // const validateOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callDeleteEventThreatDetectionCustomModule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await securitycentermanagementClient.deleteEventThreatDetectionCustomModule(request); - console.log(response); - } - - callDeleteEventThreatDetectionCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js deleted file mode 100644 index 6fee6373e18..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js +++ /dev/null @@ -1,78 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the SHA custom module, in one of the - * following formats: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - */ - // const name = 'abc123' - /** - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be deleted. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * If the request is valid, a subsequent request to delete the module could - * still fail for one of the following reasons: - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during deletion of the module - * Defaults to `false`. - */ - // const validateOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callDeleteSecurityHealthAnalyticsCustomModule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await securitycentermanagementClient.deleteSecurityHealthAnalyticsCustomModule(request); - console.log(response); - } - - callDeleteSecurityHealthAnalyticsCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js deleted file mode 100644 index 678c53d4e09..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js +++ /dev/null @@ -1,65 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Event Threat Detection custom module, in - * one of the following formats: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - */ - // const name = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callGetEffectiveEventThreatDetectionCustomModule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await securitycentermanagementClient.getEffectiveEventThreatDetectionCustomModule(request); - console.log(response); - } - - callGetEffectiveEventThreatDetectionCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js deleted file mode 100644 index 11d87d6e337..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js +++ /dev/null @@ -1,65 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_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 full resource name of the custom module, specified in one of - * the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - */ - // const name = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callGetEffectiveSecurityHealthAnalyticsCustomModule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await securitycentermanagementClient.getEffectiveSecurityHealthAnalyticsCustomModule(request); - console.log(response); - } - - callGetEffectiveSecurityHealthAnalyticsCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js deleted file mode 100644 index 9c9f91ef020..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js +++ /dev/null @@ -1,65 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The resource name of the Event Threat Detection custom module, in - * one of the following formats: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - */ - // const name = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callGetEventThreatDetectionCustomModule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await securitycentermanagementClient.getEventThreatDetectionCustomModule(request); - console.log(response); - } - - callGetEventThreatDetectionCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js deleted file mode 100644 index a1389ae15c2..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_center_service.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_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 Security Command Center service to retrieve, in one of the - * following formats: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The following values are valid for `{service}`: - * * `container-threat-detection` - * * `event-threat-detection` - * * `security-health-analytics` - * * `vm-threat-detection` - * * `web-security-scanner` - */ - // const name = 'abc123' - /** - * Set to `true` to show only modules that are in scope. By default, all - * modules are shown. - */ - // const showEligibleModulesOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callGetSecurityCenterService() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await securitycentermanagementClient.getSecurityCenterService(request); - console.log(response); - } - - callGetSecurityCenterService(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js deleted file mode 100644 index 20857982d5c..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.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 securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the resource, in the format - * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. - */ - // const name = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callGetSecurityHealthAnalyticsCustomModule() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await securitycentermanagementClient.getSecurityHealthAnalyticsCustomModule(request); - console.log(response); - } - - callGetSecurityHealthAnalyticsCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js deleted file mode 100644 index 0c7e6f1be95..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js +++ /dev/null @@ -1,80 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of parent to list custom modules, in one of the following - * formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * When paginating, the rest of the request must match the request that - * generated the page token. - */ - // const pageToken = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callListDescendantEventThreatDetectionCustomModules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = securitycentermanagementClient.listDescendantEventThreatDetectionCustomModulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDescendantEventThreatDetectionCustomModules(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js deleted file mode 100644 index a841b2d90aa..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.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) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * When paginating, the rest of the request must match the request that - * generated the page token. - */ - // const pageToken = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callListDescendantSecurityHealthAnalyticsCustomModules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = securitycentermanagementClient.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDescendantSecurityHealthAnalyticsCustomModules(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js deleted file mode 100644 index fe3606b692b..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.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) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of parent to list effective custom modules, in one of the - * following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * When paginating, the rest of the request must match the request that - * generated the page token. - */ - // const pageToken = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callListEffectiveEventThreatDetectionCustomModules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = securitycentermanagementClient.listEffectiveEventThreatDetectionCustomModulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEffectiveEventThreatDetectionCustomModules(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js deleted file mode 100644 index 4a8d8f423e9..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.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) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of parent to list effective custom modules, in one of the - * following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * When paginating, the rest of the request must match the request that - * generated the page token. - */ - // const pageToken = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callListEffectiveSecurityHealthAnalyticsCustomModules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = securitycentermanagementClient.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEffectiveSecurityHealthAnalyticsCustomModules(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js deleted file mode 100644 index 0840127b8fd..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js +++ /dev/null @@ -1,80 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of parent to list custom modules, in one of the following - * formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 modules will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * When paginating, the rest of the request must match the request that - * generated the page token. - */ - // const pageToken = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callListEventThreatDetectionCustomModules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = securitycentermanagementClient.listEventThreatDetectionCustomModulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEventThreatDetectionCustomModules(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js deleted file mode 100644 index e051aa5c402..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_center_services.js +++ /dev/null @@ -1,84 +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 securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the parent to list Security Command Center services, - * in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * When paginating, the rest of the request must match the request that - * generated the page token. - */ - // const pageToken = 'abc123' - /** - * Flag that, when set, is used to filter the module settings that are shown. - * The default setting is that all modules are shown. - */ - // const showEligibleModulesOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callListSecurityCenterServices() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = securitycentermanagementClient.listSecurityCenterServicesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSecurityCenterServices(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js deleted file mode 100644 index b18cca26557..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.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) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - */ - // const pageSize = 1234 - /** - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * When paginating, the rest of the request must match the request that - * generated the page token. - */ - // const pageToken = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callListSecurityHealthAnalyticsCustomModules() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = securitycentermanagementClient.listSecurityHealthAnalyticsCustomModulesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListSecurityHealthAnalyticsCustomModules(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js deleted file mode 100644 index 36db8be6a11..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js +++ /dev/null @@ -1,74 +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, customConfig, resource) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_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 relative resource name of the organization, project, or - * folder. For more information about relative resource names, see AIP-122: - * Resource names (https://google.aip.dev/122). Example: - * `organizations/{organization_id}`. - */ - // const parent = 'abc123' - /** - * Required. The custom configuration that you need to test. - */ - // const customConfig = {} - /** - * Required. Resource data to simulate custom module against. - */ - // const resource = {} - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callSimulateSecurityHealthAnalyticsCustomModule() { - // Construct request - const request = { - parent, - customConfig, - resource, - }; - - // Run request - const response = await securitycentermanagementClient.simulateSecurityHealthAnalyticsCustomModule(request); - console.log(response); - } - - callSimulateSecurityHealthAnalyticsCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js deleted file mode 100644 index 537420ad2cc..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.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(updateMask, eventThreatDetectionCustomModule) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_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 fields to update. If omitted, then all fields are updated. - */ - // const updateMask = {} - /** - * Required. The module being updated. - */ - // const eventThreatDetectionCustomModule = {} - /** - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be updated. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * If the request is valid, a subsequent request to update the module could - * still fail for one of the following reasons: - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * Defaults to `false`. - */ - // const validateOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callUpdateEventThreatDetectionCustomModule() { - // Construct request - const request = { - updateMask, - eventThreatDetectionCustomModule, - }; - - // Run request - const response = await securitycentermanagementClient.updateEventThreatDetectionCustomModule(request); - console.log(response); - } - - callUpdateEventThreatDetectionCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js deleted file mode 100644 index 7a733988cf8..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_center_service.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(securityCenterService, updateMask) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_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 updated service. - */ - // const securityCenterService = {} - /** - * Required. The fields to update. Accepts the following values: - * * `intended_enablement_state` - * * `modules` - * If omitted, then all eligible fields are updated. - */ - // const updateMask = {} - /** - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no service will be updated. An `OK` response indicates that - * the request is valid, while an error response indicates that the request is - * invalid. - * If the request is valid, a subsequent request to update the service could - * still fail for one of the following reasons: - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during update of the service - * Defaults to `false`. - */ - // const validateOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callUpdateSecurityCenterService() { - // Construct request - const request = { - securityCenterService, - updateMask, - }; - - // Run request - const response = await securitycentermanagementClient.updateSecurityCenterService(request); - console.log(response); - } - - callUpdateSecurityCenterService(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js deleted file mode 100644 index 1676bdfde19..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.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(updateMask, securityHealthAnalyticsCustomModule) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_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 fields to update. The following values are valid: - * * `custom_config` - * * `enablement_state` - * If you omit this field or set it to the wildcard value `*`, then all - * eligible fields are updated. - */ - // const updateMask = {} - /** - * Required. The resource being updated. - */ - // const securityHealthAnalyticsCustomModule = {} - /** - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be updated. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * If the request is valid, a subsequent request to update the module could - * still fail for one of the following reasons: - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * Defaults to `false`. - */ - // const validateOnly = true - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callUpdateSecurityHealthAnalyticsCustomModule() { - // Construct request - const request = { - updateMask, - securityHealthAnalyticsCustomModule, - }; - - // Run request - const response = await securitycentermanagementClient.updateSecurityHealthAnalyticsCustomModule(request); - console.log(response); - } - - callUpdateSecurityHealthAnalyticsCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_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-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js deleted file mode 100644 index 5264f550dc4..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js +++ /dev/null @@ -1,74 +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, rawText, type) { - // [START securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_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. Resource name of the parent to validate the custom modules under, - * in one of the following formats: - * * `organizations/{organization}/locations/{location}` - */ - // const parent = 'abc123' - /** - * Required. The raw text of the module's contents. Used to generate error - * messages. - */ - // const rawText = 'abc123' - /** - * Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. - */ - // const type = 'abc123' - - // Imports the Securitycentermanagement library - const {SecurityCenterManagementClient} = require('@google-cloud/securitycentermanagement').v1; - - // Instantiates a client - const securitycentermanagementClient = new SecurityCenterManagementClient(); - - async function callValidateEventThreatDetectionCustomModule() { - // Construct request - const request = { - parent, - rawText, - type, - }; - - // Run request - const response = await securitycentermanagementClient.validateEventThreatDetectionCustomModule(request); - console.log(response); - } - - callValidateEventThreatDetectionCustomModule(); - // [END securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_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-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json deleted file mode 100644 index 1cf92e0ba6d..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json +++ /dev/null @@ -1,983 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-securitycentermanagement", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.securitycentermanagement.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_async", - "title": "SecurityCenterManagement listEffectiveSecurityHealthAnalyticsCustomModules Sample", - "origin": "API_DEFINITION", - "description": " Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).", - "canonical": true, - "file": "security_center_management.list_effective_security_health_analytics_custom_modules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEffectiveSecurityHealthAnalyticsCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ListEffectiveSecurityHealthAnalyticsCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_async", - "title": "SecurityCenterManagement getEffectiveSecurityHealthAnalyticsCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule].", - "canonical": true, - "file": "security_center_management.get_effective_security_health_analytics_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEffectiveSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "GetEffectiveSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_async", - "title": "SecurityCenterManagement listSecurityHealthAnalyticsCustomModules Sample", - "origin": "API_DEFINITION", - "description": " Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).", - "canonical": true, - "file": "security_center_management.list_security_health_analytics_custom_modules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSecurityHealthAnalyticsCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ListSecurityHealthAnalyticsCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_async", - "title": "SecurityCenterManagement listDescendantSecurityHealthAnalyticsCustomModules Sample", - "origin": "API_DEFINITION", - "description": " Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its descendants.", - "canonical": true, - "file": "security_center_management.list_descendant_security_health_analytics_custom_modules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDescendantSecurityHealthAnalyticsCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ListDescendantSecurityHealthAnalyticsCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_async", - "title": "SecurityCenterManagement getSecurityHealthAnalyticsCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule].", - "canonical": true, - "file": "security_center_management.get_security_health_analytics_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "GetSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_async", - "title": "SecurityCenterManagement createSecurityHealthAnalyticsCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are descendants of the given parent. These modules are enabled by default.", - "canonical": true, - "file": "security_center_management.create_security_health_analytics_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "security_health_analytics_custom_module", - "type": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "CreateSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_async", - "title": "SecurityCenterManagement updateSecurityHealthAnalyticsCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom configuration of a module is supported on resident modules only.", - "canonical": true, - "file": "security_center_management.update_security_health_analytics_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "security_health_analytics_custom_module", - "type": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "UpdateSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_async", - "title": "SecurityCenterManagement deleteSecurityHealthAnalyticsCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.", - "canonical": true, - "file": "security_center_management.delete_security_health_analytics_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "DeleteSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_async", - "title": "SecurityCenterManagement simulateSecurityHealthAnalyticsCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a resource.", - "canonical": true, - "file": "security_center_management.simulate_security_health_analytics_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SimulateSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "custom_config", - "type": ".google.cloud.securitycentermanagement.v1.CustomConfig" - }, - { - "name": "resource", - "type": ".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "SimulateSecurityHealthAnalyticsCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_async", - "title": "SecurityCenterManagement listEffectiveEventThreatDetectionCustomModules Sample", - "origin": "API_DEFINITION", - "description": " Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.", - "canonical": true, - "file": "security_center_management.list_effective_event_threat_detection_custom_modules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEffectiveEventThreatDetectionCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ListEffectiveEventThreatDetectionCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_async", - "title": "SecurityCenterManagement getEffectiveEventThreatDetectionCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Gets the effective Event Threat Detection custom module at the given level. The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.", - "canonical": true, - "file": "security_center_management.get_effective_event_threat_detection_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEffectiveEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "GetEffectiveEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_async", - "title": "SecurityCenterManagement listEventThreatDetectionCustomModules Sample", - "origin": "API_DEFINITION", - "description": " Lists all Event Threat Detection custom modules for the given organization, folder, or project. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", - "canonical": true, - "file": "security_center_management.list_event_threat_detection_custom_modules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEventThreatDetectionCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ListEventThreatDetectionCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_async", - "title": "SecurityCenterManagement listDescendantEventThreatDetectionCustomModules Sample", - "origin": "API_DEFINITION", - "description": " Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.", - "canonical": true, - "file": "security_center_management.list_descendant_event_threat_detection_custom_modules.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDescendantEventThreatDetectionCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ListDescendantEventThreatDetectionCustomModules", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_async", - "title": "SecurityCenterManagement getEventThreatDetectionCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Gets an Event Threat Detection custom module.", - "canonical": true, - "file": "security_center_management.get_event_threat_detection_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 57, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "GetEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_async", - "title": "SecurityCenterManagement createEventThreatDetectionCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", - "canonical": true, - "file": "security_center_management.create_event_threat_detection_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "event_threat_detection_custom_module", - "type": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "CreateEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_async", - "title": "SecurityCenterManagement updateEventThreatDetectionCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.", - "canonical": true, - "file": "security_center_management.update_event_threat_detection_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModule", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "event_threat_detection_custom_module", - "type": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "UpdateEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateEventThreatDetectionCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_async", - "title": "SecurityCenterManagement deleteEventThreatDetectionCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Deletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.", - "canonical": true, - "file": "security_center_management.delete_event_threat_detection_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "DeleteEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_async", - "title": "SecurityCenterManagement validateEventThreatDetectionCustomModule Sample", - "origin": "API_DEFINITION", - "description": " Validates the given Event Threat Detection custom module.", - "canonical": true, - "file": "security_center_management.validate_event_threat_detection_custom_module.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ValidateEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "raw_text", - "type": "TYPE_STRING" - }, - { - "name": "type", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ValidateEventThreatDetectionCustomModule", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_async", - "title": "SecurityCenterManagement getSecurityCenterService Sample", - "origin": "API_DEFINITION", - "description": " Gets service settings for the specified Security Command Center service.", - "canonical": true, - "file": "security_center_management.get_security_center_service.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetSecurityCenterService", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "show_eligible_modules_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.SecurityCenterService", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "GetSecurityCenterService", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_async", - "title": "SecurityCenterManagement listSecurityCenterServices Sample", - "origin": "API_DEFINITION", - "description": " Returns a list of all Security Command Center services for the given parent.", - "canonical": true, - "file": "security_center_management.list_security_center_services.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListSecurityCenterServices", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "show_eligible_modules_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesResponse", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "ListSecurityCenterServices", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - }, - { - "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_async", - "title": "SecurityCenterManagement updateSecurityCenterService Sample", - "origin": "API_DEFINITION", - "description": " Updates a Security Command Center service using the given update mask.", - "canonical": true, - "file": "security_center_management.update_security_center_service.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateSecurityCenterService", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService", - "async": true, - "parameters": [ - { - "name": "security_center_service", - "type": ".google.cloud.securitycentermanagement.v1.SecurityCenterService" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.securitycentermanagement.v1.SecurityCenterService", - "client": { - "shortName": "SecurityCenterManagementClient", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient" - }, - "method": { - "shortName": "UpdateSecurityCenterService", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService", - "service": { - "shortName": "SecurityCenterManagement", - "fullName": "google.cloud.securitycentermanagement.v1.SecurityCenterManagement" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/index.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/index.ts deleted file mode 100644 index 02f4d207e86..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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 SecurityCenterManagementClient = v1.SecurityCenterManagementClient; -type SecurityCenterManagementClient = v1.SecurityCenterManagementClient; -export {v1, SecurityCenterManagementClient}; -export default {v1, SecurityCenterManagementClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json deleted file mode 100644 index ddde33f885e..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.securitycentermanagement.v1", - "libraryPackage": "@google-cloud/securitycentermanagement", - "services": { - "SecurityCenterManagement": { - "clients": { - "grpc": { - "libraryClient": "SecurityCenterManagementClient", - "rpcs": { - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "methods": [ - "getEffectiveSecurityHealthAnalyticsCustomModule" - ] - }, - "GetSecurityHealthAnalyticsCustomModule": { - "methods": [ - "getSecurityHealthAnalyticsCustomModule" - ] - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "createSecurityHealthAnalyticsCustomModule" - ] - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "updateSecurityHealthAnalyticsCustomModule" - ] - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "methods": [ - "deleteSecurityHealthAnalyticsCustomModule" - ] - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "simulateSecurityHealthAnalyticsCustomModule" - ] - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "methods": [ - "getEffectiveEventThreatDetectionCustomModule" - ] - }, - "GetEventThreatDetectionCustomModule": { - "methods": [ - "getEventThreatDetectionCustomModule" - ] - }, - "CreateEventThreatDetectionCustomModule": { - "methods": [ - "createEventThreatDetectionCustomModule" - ] - }, - "UpdateEventThreatDetectionCustomModule": { - "methods": [ - "updateEventThreatDetectionCustomModule" - ] - }, - "DeleteEventThreatDetectionCustomModule": { - "methods": [ - "deleteEventThreatDetectionCustomModule" - ] - }, - "ValidateEventThreatDetectionCustomModule": { - "methods": [ - "validateEventThreatDetectionCustomModule" - ] - }, - "GetSecurityCenterService": { - "methods": [ - "getSecurityCenterService" - ] - }, - "UpdateSecurityCenterService": { - "methods": [ - "updateSecurityCenterService" - ] - }, - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listEffectiveSecurityHealthAnalyticsCustomModules", - "listEffectiveSecurityHealthAnalyticsCustomModulesStream", - "listEffectiveSecurityHealthAnalyticsCustomModulesAsync" - ] - }, - "ListSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listSecurityHealthAnalyticsCustomModules", - "listSecurityHealthAnalyticsCustomModulesStream", - "listSecurityHealthAnalyticsCustomModulesAsync" - ] - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listDescendantSecurityHealthAnalyticsCustomModules", - "listDescendantSecurityHealthAnalyticsCustomModulesStream", - "listDescendantSecurityHealthAnalyticsCustomModulesAsync" - ] - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "methods": [ - "listEffectiveEventThreatDetectionCustomModules", - "listEffectiveEventThreatDetectionCustomModulesStream", - "listEffectiveEventThreatDetectionCustomModulesAsync" - ] - }, - "ListEventThreatDetectionCustomModules": { - "methods": [ - "listEventThreatDetectionCustomModules", - "listEventThreatDetectionCustomModulesStream", - "listEventThreatDetectionCustomModulesAsync" - ] - }, - "ListDescendantEventThreatDetectionCustomModules": { - "methods": [ - "listDescendantEventThreatDetectionCustomModules", - "listDescendantEventThreatDetectionCustomModulesStream", - "listDescendantEventThreatDetectionCustomModulesAsync" - ] - }, - "ListSecurityCenterServices": { - "methods": [ - "listSecurityCenterServices", - "listSecurityCenterServicesStream", - "listSecurityCenterServicesAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "SecurityCenterManagementClient", - "rpcs": { - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "methods": [ - "getEffectiveSecurityHealthAnalyticsCustomModule" - ] - }, - "GetSecurityHealthAnalyticsCustomModule": { - "methods": [ - "getSecurityHealthAnalyticsCustomModule" - ] - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "createSecurityHealthAnalyticsCustomModule" - ] - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "updateSecurityHealthAnalyticsCustomModule" - ] - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "methods": [ - "deleteSecurityHealthAnalyticsCustomModule" - ] - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "methods": [ - "simulateSecurityHealthAnalyticsCustomModule" - ] - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "methods": [ - "getEffectiveEventThreatDetectionCustomModule" - ] - }, - "GetEventThreatDetectionCustomModule": { - "methods": [ - "getEventThreatDetectionCustomModule" - ] - }, - "CreateEventThreatDetectionCustomModule": { - "methods": [ - "createEventThreatDetectionCustomModule" - ] - }, - "UpdateEventThreatDetectionCustomModule": { - "methods": [ - "updateEventThreatDetectionCustomModule" - ] - }, - "DeleteEventThreatDetectionCustomModule": { - "methods": [ - "deleteEventThreatDetectionCustomModule" - ] - }, - "ValidateEventThreatDetectionCustomModule": { - "methods": [ - "validateEventThreatDetectionCustomModule" - ] - }, - "GetSecurityCenterService": { - "methods": [ - "getSecurityCenterService" - ] - }, - "UpdateSecurityCenterService": { - "methods": [ - "updateSecurityCenterService" - ] - }, - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listEffectiveSecurityHealthAnalyticsCustomModules", - "listEffectiveSecurityHealthAnalyticsCustomModulesStream", - "listEffectiveSecurityHealthAnalyticsCustomModulesAsync" - ] - }, - "ListSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listSecurityHealthAnalyticsCustomModules", - "listSecurityHealthAnalyticsCustomModulesStream", - "listSecurityHealthAnalyticsCustomModulesAsync" - ] - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "methods": [ - "listDescendantSecurityHealthAnalyticsCustomModules", - "listDescendantSecurityHealthAnalyticsCustomModulesStream", - "listDescendantSecurityHealthAnalyticsCustomModulesAsync" - ] - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "methods": [ - "listEffectiveEventThreatDetectionCustomModules", - "listEffectiveEventThreatDetectionCustomModulesStream", - "listEffectiveEventThreatDetectionCustomModulesAsync" - ] - }, - "ListEventThreatDetectionCustomModules": { - "methods": [ - "listEventThreatDetectionCustomModules", - "listEventThreatDetectionCustomModulesStream", - "listEventThreatDetectionCustomModulesAsync" - ] - }, - "ListDescendantEventThreatDetectionCustomModules": { - "methods": [ - "listDescendantEventThreatDetectionCustomModules", - "listDescendantEventThreatDetectionCustomModulesStream", - "listDescendantEventThreatDetectionCustomModulesAsync" - ] - }, - "ListSecurityCenterServices": { - "methods": [ - "listSecurityCenterServices", - "listSecurityCenterServicesStream", - "listSecurityCenterServicesAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/index.ts deleted file mode 100644 index 0d5a600f88b..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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 {SecurityCenterManagementClient} from './security_center_management_client'; diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts deleted file mode 100644 index b255733ad37..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client.ts +++ /dev/null @@ -1,4154 +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, PaginationCallback, GaxCall, 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/security_center_management_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './security_center_management_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Service describing handlers for resources - * @class - * @memberof v1 - */ -export class SecurityCenterManagementClient { - 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}; - locationsClient: LocationsClient; - pathTemplates: {[name: string]: gax.PathTemplate}; - securityCenterManagementStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of SecurityCenterManagementClient. - * - * @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 SecurityCenterManagementClient({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 SecurityCenterManagementClient; - 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 = 'securitycentermanagement.' + 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.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 = { - folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}' - ), - folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}' - ), - folderLocationEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}' - ), - folderLocationSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}' - ), - folderLocationServicePathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/locations/{location}/securityCenterServices/{service}' - ), - folderSourceFindingPathTemplate: new this._gaxModule.PathTemplate( - 'folders/{folder}/sources/{source}/findings/{finding}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - organizationPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}' - ), - organizationLocationPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}' - ), - organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}' - ), - organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}' - ), - organizationLocationEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}' - ), - organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}' - ), - organizationLocationServicePathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/locations/{location}/securityCenterServices/{service}' - ), - organizationSourceFindingPathTemplate: new this._gaxModule.PathTemplate( - 'organizations/{organization}/sources/{source}/findings/{finding}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}' - ), - projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}' - ), - projectLocationEventThreatDetectionCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}' - ), - projectLocationSecurityHealthAnalyticsCustomModulePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}' - ), - projectLocationServicePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/securityCenterServices/{service}' - ), - projectSourceFindingPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/sources/{source}/findings/{finding}' - ), - }; - - // 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 = { - listEffectiveSecurityHealthAnalyticsCustomModules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'effectiveSecurityHealthAnalyticsCustomModules'), - listSecurityHealthAnalyticsCustomModules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'securityHealthAnalyticsCustomModules'), - listDescendantSecurityHealthAnalyticsCustomModules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'securityHealthAnalyticsCustomModules'), - listEffectiveEventThreatDetectionCustomModules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'effectiveEventThreatDetectionCustomModules'), - listEventThreatDetectionCustomModules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'eventThreatDetectionCustomModules'), - listDescendantEventThreatDetectionCustomModules: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'eventThreatDetectionCustomModules'), - listSecurityCenterServices: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'securityCenterServices') - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.securitycentermanagement.v1.SecurityCenterManagement', 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.securityCenterManagementStub) { - return this.securityCenterManagementStub; - } - - // Put together the "service stub" for - // google.cloud.securitycentermanagement.v1.SecurityCenterManagement. - this.securityCenterManagementStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.securitycentermanagement.v1.SecurityCenterManagement') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.securitycentermanagement.v1.SecurityCenterManagement, - 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 securityCenterManagementStubMethods = - ['listEffectiveSecurityHealthAnalyticsCustomModules', 'getEffectiveSecurityHealthAnalyticsCustomModule', 'listSecurityHealthAnalyticsCustomModules', 'listDescendantSecurityHealthAnalyticsCustomModules', 'getSecurityHealthAnalyticsCustomModule', 'createSecurityHealthAnalyticsCustomModule', 'updateSecurityHealthAnalyticsCustomModule', 'deleteSecurityHealthAnalyticsCustomModule', 'simulateSecurityHealthAnalyticsCustomModule', 'listEffectiveEventThreatDetectionCustomModules', 'getEffectiveEventThreatDetectionCustomModule', 'listEventThreatDetectionCustomModules', 'listDescendantEventThreatDetectionCustomModules', 'getEventThreatDetectionCustomModule', 'createEventThreatDetectionCustomModule', 'updateEventThreatDetectionCustomModule', 'deleteEventThreatDetectionCustomModule', 'validateEventThreatDetectionCustomModule', 'getSecurityCenterService', 'listSecurityCenterServices', 'updateSecurityCenterService']; - for (const methodName of securityCenterManagementStubMethods) { - const callPromise = this.securityCenterManagementStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.securityCenterManagementStub; - } - - /** - * 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 'securitycentermanagement.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 'securitycentermanagement.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return [ - 'https://www.googleapis.com/auth/cloud-platform' - ]; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId(callback?: Callback): - Promise|void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- -/** - * Gets details of a single - * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The full resource name of the custom module, specified in one of - * the following formats: - * - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. - * 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/security_center_management.get_effective_security_health_analytics_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_async - */ - getEffectiveSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>; - getEffectiveSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getEffectiveSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getEffectiveSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getEffectiveSecurityHealthAnalyticsCustomModule(request, options, callback); - } -/** - * Retrieves a - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource, in the format - * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. - * 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/security_center_management.get_security_health_analytics_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_async - */ - getSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>; - getSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getSecurityHealthAnalyticsCustomModule(request, options, callback); - } -/** - * Creates a resident - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} - * at the scope of the given organization, folder, or project, and also - * creates inherited `SecurityHealthAnalyticsCustomModule` resources for all - * folders and projects that are descendants of the given parent. These - * modules are enabled by default. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of the parent organization, folder, or project of the - * module, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule - * Required. The resource being created. - * @param {boolean} [request.validateOnly] - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be created. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * - * If the request is valid, a subsequent request to create the module could - * still fail for one of the following reasons: - * - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * - * Defaults to `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. - * 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/security_center_management.create_security_health_analytics_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_async - */ - createSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>; - createSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - createSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - createSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.createSecurityHealthAnalyticsCustomModule(request, options, callback); - } -/** - * Updates the - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} - * under the given name based on the given update mask. Updating the - * enablement state is supported on both resident and inherited modules - * (though resident modules cannot have an enablement state of "inherited"). - * Updating the display name and custom configuration of a module is supported - * on resident modules only. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. The fields to update. The following values are valid: - * - * * `custom_config` - * * `enablement_state` - * - * If you omit this field or set it to the wildcard value `*`, then all - * eligible fields are updated. - * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule - * Required. The resource being updated. - * @param {boolean} [request.validateOnly] - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be updated. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * - * If the request is valid, a subsequent request to update the module could - * still fail for one of the following reasons: - * - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * - * Defaults to `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. - * 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/security_center_management.update_security_health_analytics_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_async - */ - updateSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>; - updateSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - updateSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - updateSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'security_health_analytics_custom_module.name': request.securityHealthAnalyticsCustomModule!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateSecurityHealthAnalyticsCustomModule(request, options, callback); - } -/** - * Deletes the specified - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} - * and all of its descendants in the resource hierarchy. This method is only - * supported for resident custom modules. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the SHA custom module, in one of the - * following formats: - * - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - * @param {boolean} [request.validateOnly] - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be deleted. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * - * If the request is valid, a subsequent request to delete the module could - * still fail for one of the following reasons: - * - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during deletion of the module - * - * Defaults to `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_async - */ - deleteSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>; - deleteSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - deleteSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - deleteSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.deleteSecurityHealthAnalyticsCustomModule(request, options, callback); - } -/** - * Simulates the result of using a - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} - * to check a resource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see [AIP-122: - * Resource names](https://google.aip.dev/122). Example: - * `organizations/{organization_id}`. - * @param {google.cloud.securitycentermanagement.v1.CustomConfig} request.customConfig - * Required. The custom configuration that you need to test. - * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} request.resource - * Required. Resource data to simulate custom module against. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse|SimulateSecurityHealthAnalyticsCustomModuleResponse}. - * 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/security_center_management.simulate_security_health_analytics_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_async - */ - simulateSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>; - simulateSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - simulateSecurityHealthAnalyticsCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - simulateSecurityHealthAnalyticsCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.simulateSecurityHealthAnalyticsCustomModule(request, options, callback); - } -/** - * Gets the effective Event Threat Detection custom module at the given level. - * - * The difference between an - * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule} - * and an - * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} - * is that the fields for an `EffectiveEventThreatDetectionCustomModule` are - * computed from ancestors if needed. For example, the enablement state for an - * `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or - * `INHERITED`. In contrast, the enablement state for an - * `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` - * or `DISABLED`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Event Threat Detection custom module, in - * one of the following formats: - * - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. - * 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/security_center_management.get_effective_event_threat_detection_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_async - */ - getEffectiveEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>; - getEffectiveEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getEffectiveEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getEffectiveEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEffectiveEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getEffectiveEventThreatDetectionCustomModule(request, options, callback); - } -/** - * Gets an Event Threat Detection custom module. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Event Threat Detection custom module, in - * one of the following formats: - * - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. - * 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/security_center_management.get_event_threat_detection_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetEventThreatDetectionCustomModule_async - */ - getEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>; - getEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - getEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IGetEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getEventThreatDetectionCustomModule(request, options, callback); - } -/** - * Creates a resident Event Threat Detection custom module at the scope of the - * given organization, folder, or project, and creates inherited custom - * modules for all descendants of the given parent. These modules are enabled - * by default. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of parent for the module, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule - * Required. The module to create. The - * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name|EventThreatDetectionCustomModule.name} - * field is ignored; Security Command Center generates the name. - * @param {boolean} [request.validateOnly] - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be created. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * - * If the request is valid, a subsequent request to create the module could - * still fail for one of the following reasons: - * - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * - * Defaults to `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. - * 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/security_center_management.create_event_threat_detection_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_async - */ - createEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>; - createEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - createEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - createEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.ICreateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.createEventThreatDetectionCustomModule(request, options, callback); - } -/** - * Updates the Event Threat Detection custom module with the given name based - * on the given update mask. Updating the enablement state is supported for - * both resident and inherited modules (though resident modules cannot have an - * enablement state of "inherited"). Updating the display name or - * configuration of a module is supported for resident modules only. The type - * of a module cannot be changed. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. The fields to update. If omitted, then all fields are updated. - * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule - * Required. The module being updated. - * @param {boolean} [request.validateOnly] - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be updated. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * - * If the request is valid, a subsequent request to update the module could - * still fail for one of the following reasons: - * - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * - * Defaults to `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. - * 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/security_center_management.update_event_threat_detection_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateEventThreatDetectionCustomModule_async - */ - updateEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>; - updateEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - updateEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - updateEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule, - protos.google.cloud.securitycentermanagement.v1.IUpdateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'event_threat_detection_custom_module.name': request.eventThreatDetectionCustomModule!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateEventThreatDetectionCustomModule(request, options, callback); - } -/** - * Deletes the specified Event Threat Detection custom module and all of its - * descendants in the resource hierarchy. This method is only supported for - * resident custom modules. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Event Threat Detection custom module, in - * one of the following formats: - * - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` - * @param {boolean} [request.validateOnly] - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no module will be deleted. An `OK` response indicates that the - * request is valid, while an error response indicates that the request is - * invalid. - * - * If the request is valid, a subsequent request to delete the module could - * still fail for one of the following reasons: - * - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during creation of the module - * - * Defaults to `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_async - */ - deleteEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>; - deleteEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - deleteEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - deleteEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.securitycentermanagement.v1.IDeleteEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.deleteEventThreatDetectionCustomModule(request, options, callback); - } -/** - * Validates the given Event Threat Detection custom module. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Resource name of the parent to validate the custom modules under, - * in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * @param {string} request.rawText - * Required. The raw text of the module's contents. Used to generate error - * messages. - * @param {string} request.type - * Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse|ValidateEventThreatDetectionCustomModuleResponse}. - * 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/security_center_management.validate_event_threat_detection_custom_module.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ValidateEventThreatDetectionCustomModule_async - */ - validateEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>; - validateEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - validateEventThreatDetectionCustomModule( - request: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): void; - validateEventThreatDetectionCustomModule( - request?: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse, - protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.validateEventThreatDetectionCustomModule(request, options, callback); - } -/** - * Gets service settings for the specified Security Command Center service. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The Security Command Center service to retrieve, in one of the - * following formats: - * - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * - * The following values are valid for `{service}`: - * - * * `container-threat-detection` - * * `event-threat-detection` - * * `security-health-analytics` - * * `vm-threat-detection` - * * `web-security-scanner` - * @param {boolean} request.showEligibleModulesOnly - * Set to `true` to show only modules that are in scope. By default, all - * modules are shown. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. - * 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/security_center_management.get_security_center_service.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityCenterService_async - */ - getSecurityCenterService( - request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|undefined, {}|undefined - ]>; - getSecurityCenterService( - request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>): void; - getSecurityCenterService( - request: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>): void; - getSecurityCenterService( - request?: protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IGetSecurityCenterServiceRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.getSecurityCenterService(request, options, callback); - } -/** - * Updates a Security Command Center service using the given update mask. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} request.securityCenterService - * Required. The updated service. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. The fields to update. Accepts the following values: - * - * * `intended_enablement_state` - * * `modules` - * - * If omitted, then all eligible fields are updated. - * @param {boolean} [request.validateOnly] - * Optional. When set to `true`, the request will be validated (including IAM - * checks), but no service will be updated. An `OK` response indicates that - * the request is valid, while an error response indicates that the request is - * invalid. - * - * If the request is valid, a subsequent request to update the service could - * still fail for one of the following reasons: - * - * * The state of your cloud resources changed; for example, you lost a - * required IAM permission - * * An error occurred during update of the service - * - * Defaults to `false`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. - * 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/security_center_management.update_security_center_service.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityCenterService_async - */ - updateSecurityCenterService( - request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|undefined, {}|undefined - ]>; - updateSecurityCenterService( - request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>): void; - updateSecurityCenterService( - request: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, - callback: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>): void; - updateSecurityCenterService( - request?: protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService, - protos.google.cloud.securitycentermanagement.v1.IUpdateSecurityCenterServiceRequest|undefined, {}|undefined - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'security_center_service.name': request.securityCenterService!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateSecurityCenterService(request, options, callback); - } - - /** - * Returns a list of all - * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule} - * resources for the given parent. This includes resident modules defined at - * the scope of the parent, and inherited modules, inherited from ancestor - * organizations, folders, and projects (no descendants). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of parent to list effective custom modules, in one of the - * following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. - * 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 `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` - * 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. - */ - listEffectiveSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse - ]>; - listEffectiveSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>): void; - listEffectiveSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>): void; - listEffectiveSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>, - callback?: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listEffectiveSecurityHealthAnalyticsCustomModules(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. Name of parent to list effective custom modules, in one of the - * following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule} 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 `listEffectiveSecurityHealthAnalyticsCustomModulesAsync()` - * 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. - */ - listEffectiveSecurityHealthAnalyticsCustomModulesStream( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - 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['listEffectiveSecurityHealthAnalyticsCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream( - this.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEffectiveSecurityHealthAnalyticsCustomModules`, 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. Name of parent to list effective custom modules, in one of the - * following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. 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/security_center_management.list_effective_security_health_analytics_custom_modules.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_async - */ - listEffectiveSecurityHealthAnalyticsCustomModulesAsync( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveSecurityHealthAnalyticsCustomModulesRequest, - 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['listEffectiveSecurityHealthAnalyticsCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate( - this.innerApiCalls['listEffectiveSecurityHealthAnalyticsCustomModules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns a list of all - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} - * resources for the given parent. This includes resident modules defined at - * the scope of the parent, and inherited modules, inherited from ancestor - * organizations, folders, and projects (no descendants). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. - * 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 `listSecurityHealthAnalyticsCustomModulesAsync()` - * 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. - */ - listSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse - ]>; - listSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; - listSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; - listSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>, - callback?: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listSecurityHealthAnalyticsCustomModules(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. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} 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 `listSecurityHealthAnalyticsCustomModulesAsync()` - * 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. - */ - listSecurityHealthAnalyticsCustomModulesStream( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - 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['listSecurityHealthAnalyticsCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream( - this.innerApiCalls.listSecurityHealthAnalyticsCustomModules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listSecurityHealthAnalyticsCustomModules`, 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. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. 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/security_center_management.list_security_health_analytics_custom_modules.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_async - */ - listSecurityHealthAnalyticsCustomModulesAsync( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityHealthAnalyticsCustomModulesRequest, - 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['listSecurityHealthAnalyticsCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate( - this.innerApiCalls['listSecurityHealthAnalyticsCustomModules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns a list of all resident - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} - * resources under the given organization, folder, or project and all of its - * descendants. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. - * 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 `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` - * 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. - */ - listDescendantSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse - ]>; - listDescendantSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; - listDescendantSecurityHealthAnalyticsCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): void; - listDescendantSecurityHealthAnalyticsCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>, - callback?: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listDescendantSecurityHealthAnalyticsCustomModules(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. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} 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 `listDescendantSecurityHealthAnalyticsCustomModulesAsync()` - * 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. - */ - listDescendantSecurityHealthAnalyticsCustomModulesStream( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - 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['listDescendantSecurityHealthAnalyticsCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream( - this.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDescendantSecurityHealthAnalyticsCustomModules`, 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. Name of the parent organization, folder, or project in which to - * list custom modules, in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. 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/security_center_management.list_descendant_security_health_analytics_custom_modules.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_async - */ - listDescendantSecurityHealthAnalyticsCustomModulesAsync( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantSecurityHealthAnalyticsCustomModulesRequest, - 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['listDescendantSecurityHealthAnalyticsCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate( - this.innerApiCalls['listDescendantSecurityHealthAnalyticsCustomModules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all effective Event Threat Detection custom modules for the - * given parent. This includes resident modules defined at the scope of the - * parent along with modules inherited from its ancestors. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of parent to list effective custom modules, in one of the - * following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. - * 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 `listEffectiveEventThreatDetectionCustomModulesAsync()` - * 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. - */ - listEffectiveEventThreatDetectionCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse - ]>; - listEffectiveEventThreatDetectionCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>): void; - listEffectiveEventThreatDetectionCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>): void; - listEffectiveEventThreatDetectionCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>, - callback?: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listEffectiveEventThreatDetectionCustomModules(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. Name of parent to list effective custom modules, in one of the - * following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule} 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 `listEffectiveEventThreatDetectionCustomModulesAsync()` - * 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. - */ - listEffectiveEventThreatDetectionCustomModulesStream( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - 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['listEffectiveEventThreatDetectionCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream( - this.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEffectiveEventThreatDetectionCustomModules`, 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. Name of parent to list effective custom modules, in one of the - * following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule}. 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/security_center_management.list_effective_event_threat_detection_custom_modules.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveEventThreatDetectionCustomModules_async - */ - listEffectiveEventThreatDetectionCustomModulesAsync( - request?: protos.google.cloud.securitycentermanagement.v1.IListEffectiveEventThreatDetectionCustomModulesRequest, - 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['listEffectiveEventThreatDetectionCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate( - this.innerApiCalls['listEffectiveEventThreatDetectionCustomModules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all Event Threat Detection custom modules for the given organization, - * folder, or project. This includes resident modules defined at the scope of - * the parent along with modules inherited from ancestors. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of parent to list custom modules, in one of the following - * formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 modules will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. - * 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 `listEventThreatDetectionCustomModulesAsync()` - * 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. - */ - listEventThreatDetectionCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse - ]>; - listEventThreatDetectionCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; - listEventThreatDetectionCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; - listEventThreatDetectionCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>, - callback?: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listEventThreatDetectionCustomModules(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. Name of parent to list custom modules, in one of the following - * formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 modules will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} 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 `listEventThreatDetectionCustomModulesAsync()` - * 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. - */ - listEventThreatDetectionCustomModulesStream( - request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - 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['listEventThreatDetectionCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEventThreatDetectionCustomModules.createStream( - this.innerApiCalls.listEventThreatDetectionCustomModules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEventThreatDetectionCustomModules`, 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. Name of parent to list custom modules, in one of the following - * formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 modules will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. 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/security_center_management.list_event_threat_detection_custom_modules.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_async - */ - listEventThreatDetectionCustomModulesAsync( - request?: protos.google.cloud.securitycentermanagement.v1.IListEventThreatDetectionCustomModulesRequest, - 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['listEventThreatDetectionCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate( - this.innerApiCalls['listEventThreatDetectionCustomModules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists all resident Event Threat Detection custom modules for the given - * organization, folder, or project and its descendants. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Name of parent to list custom modules, in one of the following - * formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. - * 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 `listDescendantEventThreatDetectionCustomModulesAsync()` - * 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. - */ - listDescendantEventThreatDetectionCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse - ]>; - listDescendantEventThreatDetectionCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; - listDescendantEventThreatDetectionCustomModules( - request: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): void; - listDescendantEventThreatDetectionCustomModules( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>, - callback?: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[], - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listDescendantEventThreatDetectionCustomModules(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. Name of parent to list custom modules, in one of the following - * formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} 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 `listDescendantEventThreatDetectionCustomModulesAsync()` - * 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. - */ - listDescendantEventThreatDetectionCustomModulesStream( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - 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['listDescendantEventThreatDetectionCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream( - this.innerApiCalls.listDescendantEventThreatDetectionCustomModules as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDescendantEventThreatDetectionCustomModules`, 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. Name of parent to list custom modules, in one of the following - * formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule}. 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/security_center_management.list_descendant_event_threat_detection_custom_modules.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_async - */ - listDescendantEventThreatDetectionCustomModulesAsync( - request?: protos.google.cloud.securitycentermanagement.v1.IListDescendantEventThreatDetectionCustomModulesRequest, - 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['listDescendantEventThreatDetectionCustomModules']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate( - this.innerApiCalls['listDescendantEventThreatDetectionCustomModules'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Returns a list of all Security Command Center services for the given - * parent. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the parent to list Security Command Center services, - * in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {boolean} request.showEligibleModulesOnly - * Flag that, when set, is used to filter the module settings that are shown. - * The default setting is that all modules are shown. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. - * 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 `listSecurityCenterServicesAsync()` - * 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. - */ - listSecurityCenterServices( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[], - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse - ]>; - listSecurityCenterServices( - request: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>): void; - listSecurityCenterServices( - request: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - callback: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>): void; - listSecurityCenterServices( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>, - callback?: PaginationCallback< - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse|null|undefined, - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService>): - Promise<[ - protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[], - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest|null, - protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listSecurityCenterServices(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 name of the parent to list Security Command Center services, - * in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {boolean} request.showEligibleModulesOnly - * Flag that, when set, is used to filter the module settings that are shown. - * The default setting is that all modules are shown. - * @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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService} 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 `listSecurityCenterServicesAsync()` - * 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. - */ - listSecurityCenterServicesStream( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - 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['listSecurityCenterServices']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listSecurityCenterServices.createStream( - this.innerApiCalls.listSecurityCenterServices as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listSecurityCenterServices`, 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 name of the parent to list Security Command Center services, - * in one of the following formats: - * - * * `organizations/{organization}/locations/{location}` - * * `folders/{folder}/locations/{location}` - * * `projects/{project}/locations/{location}` - * @param {number} [request.pageSize] - * Optional. The maximum number of results to return in a single response. - * Default is 10, minimum is 1, maximum is 1000. - * @param {string} [request.pageToken] - * Optional. A pagination token returned from a previous request. Provide this - * token to retrieve the next page of results. - * - * When paginating, the rest of the request must match the request that - * generated the page token. - * @param {boolean} request.showEligibleModulesOnly - * Flag that, when set, is used to filter the module settings that are shown. - * The default setting is that all modules are shown. - * @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.securitycentermanagement.v1.SecurityCenterService|SecurityCenterService}. 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/security_center_management.list_security_center_services.js - * region_tag:securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityCenterServices_async - */ - listSecurityCenterServicesAsync( - request?: protos.google.cloud.securitycentermanagement.v1.IListSecurityCenterServicesRequest, - 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['listSecurityCenterServices']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listSecurityCenterServices.asyncIterate( - this.innerApiCalls['listSecurityCenterServices'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified folderLocationEffectiveEventThreatDetectionCustomModule resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} effective_event_threat_detection_custom_module - * @returns {string} Resource name string. - */ - folderLocationEffectiveEventThreatDetectionCustomModulePath(folder:string,location:string,effectiveEventThreatDetectionCustomModule:string) { - return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render({ - folder: folder, - location: location, - effective_event_threat_detection_custom_module: effectiveEventThreatDetectionCustomModule, - }); - } - - /** - * Parse the folder from FolderLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} folderLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing folder_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(folderLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(folderLocationEffectiveEventThreatDetectionCustomModuleName).folder; - } - - /** - * Parse the location from FolderLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} folderLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing folder_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(folderLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(folderLocationEffectiveEventThreatDetectionCustomModuleName).location; - } - - /** - * Parse the effective_event_threat_detection_custom_module from FolderLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} folderLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing folder_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the effective_event_threat_detection_custom_module. - */ - matchEffectiveEventThreatDetectionCustomModuleFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(folderLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(folderLocationEffectiveEventThreatDetectionCustomModuleName).effective_event_threat_detection_custom_module; - } - - /** - * Return a fully-qualified folderLocationEffectiveSecurityHealthAnalyticsCustomModule resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} effective_security_health_analytics_custom_module - * @returns {string} Resource name string. - */ - folderLocationEffectiveSecurityHealthAnalyticsCustomModulePath(folder:string,location:string,effectiveSecurityHealthAnalyticsCustomModule:string) { - return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render({ - folder: folder, - location: location, - effective_security_health_analytics_custom_module: effectiveSecurityHealthAnalyticsCustomModule, - }); - } - - /** - * Parse the folder from FolderLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing folder_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName).folder; - } - - /** - * Parse the location from FolderLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing folder_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName).location; - } - - /** - * Parse the effective_security_health_analytics_custom_module from FolderLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing folder_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the effective_security_health_analytics_custom_module. - */ - matchEffectiveSecurityHealthAnalyticsCustomModuleFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationEffectiveSecurityHealthAnalyticsCustomModuleName).effective_security_health_analytics_custom_module; - } - - /** - * Return a fully-qualified folderLocationEventThreatDetectionCustomModule resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} event_threat_detection_custom_module - * @returns {string} Resource name string. - */ - folderLocationEventThreatDetectionCustomModulePath(folder:string,location:string,eventThreatDetectionCustomModule:string) { - return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.render({ - folder: folder, - location: location, - event_threat_detection_custom_module: eventThreatDetectionCustomModule, - }); - } - - /** - * Parse the folder from FolderLocationEventThreatDetectionCustomModule resource. - * - * @param {string} folderLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing folder_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationEventThreatDetectionCustomModuleName(folderLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match(folderLocationEventThreatDetectionCustomModuleName).folder; - } - - /** - * Parse the location from FolderLocationEventThreatDetectionCustomModule resource. - * - * @param {string} folderLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing folder_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationEventThreatDetectionCustomModuleName(folderLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match(folderLocationEventThreatDetectionCustomModuleName).location; - } - - /** - * Parse the event_threat_detection_custom_module from FolderLocationEventThreatDetectionCustomModule resource. - * - * @param {string} folderLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing folder_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the event_threat_detection_custom_module. - */ - matchEventThreatDetectionCustomModuleFromFolderLocationEventThreatDetectionCustomModuleName(folderLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match(folderLocationEventThreatDetectionCustomModuleName).event_threat_detection_custom_module; - } - - /** - * Return a fully-qualified folderLocationSecurityHealthAnalyticsCustomModule resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} security_health_analytics_custom_module - * @returns {string} Resource name string. - */ - folderLocationSecurityHealthAnalyticsCustomModulePath(folder:string,location:string,securityHealthAnalyticsCustomModule:string) { - return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.render({ - folder: folder, - location: location, - security_health_analytics_custom_module: securityHealthAnalyticsCustomModule, - }); - } - - /** - * Parse the folder from FolderLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} folderLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing folder_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationSecurityHealthAnalyticsCustomModuleName(folderLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationSecurityHealthAnalyticsCustomModuleName).folder; - } - - /** - * Parse the location from FolderLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} folderLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing folder_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationSecurityHealthAnalyticsCustomModuleName(folderLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationSecurityHealthAnalyticsCustomModuleName).location; - } - - /** - * Parse the security_health_analytics_custom_module from FolderLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} folderLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing folder_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the security_health_analytics_custom_module. - */ - matchSecurityHealthAnalyticsCustomModuleFromFolderLocationSecurityHealthAnalyticsCustomModuleName(folderLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(folderLocationSecurityHealthAnalyticsCustomModuleName).security_health_analytics_custom_module; - } - - /** - * Return a fully-qualified folderLocationService resource name string. - * - * @param {string} folder - * @param {string} location - * @param {string} service - * @returns {string} Resource name string. - */ - folderLocationServicePath(folder:string,location:string,service:string) { - return this.pathTemplates.folderLocationServicePathTemplate.render({ - folder: folder, - location: location, - service: service, - }); - } - - /** - * Parse the folder from FolderLocationService resource. - * - * @param {string} folderLocationServiceName - * A fully-qualified path representing folder_location_service resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderLocationServiceName(folderLocationServiceName: string) { - return this.pathTemplates.folderLocationServicePathTemplate.match(folderLocationServiceName).folder; - } - - /** - * Parse the location from FolderLocationService resource. - * - * @param {string} folderLocationServiceName - * A fully-qualified path representing folder_location_service resource. - * @returns {string} A string representing the location. - */ - matchLocationFromFolderLocationServiceName(folderLocationServiceName: string) { - return this.pathTemplates.folderLocationServicePathTemplate.match(folderLocationServiceName).location; - } - - /** - * Parse the service from FolderLocationService resource. - * - * @param {string} folderLocationServiceName - * A fully-qualified path representing folder_location_service resource. - * @returns {string} A string representing the service. - */ - matchServiceFromFolderLocationServiceName(folderLocationServiceName: string) { - return this.pathTemplates.folderLocationServicePathTemplate.match(folderLocationServiceName).service; - } - - /** - * Return a fully-qualified folderSourceFinding resource name string. - * - * @param {string} folder - * @param {string} source - * @param {string} finding - * @returns {string} Resource name string. - */ - folderSourceFindingPath(folder:string,source:string,finding:string) { - return this.pathTemplates.folderSourceFindingPathTemplate.render({ - folder: folder, - source: source, - finding: finding, - }); - } - - /** - * Parse the folder from FolderSourceFinding resource. - * - * @param {string} folderSourceFindingName - * A fully-qualified path representing folder_source_finding resource. - * @returns {string} A string representing the folder. - */ - matchFolderFromFolderSourceFindingName(folderSourceFindingName: string) { - return this.pathTemplates.folderSourceFindingPathTemplate.match(folderSourceFindingName).folder; - } - - /** - * Parse the source from FolderSourceFinding resource. - * - * @param {string} folderSourceFindingName - * A fully-qualified path representing folder_source_finding resource. - * @returns {string} A string representing the source. - */ - matchSourceFromFolderSourceFindingName(folderSourceFindingName: string) { - return this.pathTemplates.folderSourceFindingPathTemplate.match(folderSourceFindingName).source; - } - - /** - * Parse the finding from FolderSourceFinding resource. - * - * @param {string} folderSourceFindingName - * A fully-qualified path representing folder_source_finding resource. - * @returns {string} A string representing the finding. - */ - matchFindingFromFolderSourceFindingName(folderSourceFindingName: string) { - return this.pathTemplates.folderSourceFindingPathTemplate.match(folderSourceFindingName).finding; - } - - /** - * 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 organization resource name string. - * - * @param {string} organization - * @returns {string} Resource name string. - */ - organizationPath(organization:string) { - return this.pathTemplates.organizationPathTemplate.render({ - organization: organization, - }); - } - - /** - * Parse the organization from Organization resource. - * - * @param {string} organizationName - * A fully-qualified path representing Organization resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationName(organizationName: string) { - return this.pathTemplates.organizationPathTemplate.match(organizationName).organization; - } - - /** - * Return a fully-qualified organizationLocation resource name string. - * - * @param {string} organization - * @param {string} location - * @returns {string} Resource name string. - */ - organizationLocationPath(organization:string,location:string) { - return this.pathTemplates.organizationLocationPathTemplate.render({ - organization: organization, - location: location, - }); - } - - /** - * Parse the organization from OrganizationLocation resource. - * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).organization; - } - - /** - * Parse the location from OrganizationLocation resource. - * - * @param {string} organizationLocationName - * A fully-qualified path representing OrganizationLocation resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationName(organizationLocationName: string) { - return this.pathTemplates.organizationLocationPathTemplate.match(organizationLocationName).location; - } - - /** - * Return a fully-qualified organizationLocationEffectiveEventThreatDetectionCustomModule resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} effective_event_threat_detection_custom_module - * @returns {string} Resource name string. - */ - organizationLocationEffectiveEventThreatDetectionCustomModulePath(organization:string,location:string,effectiveEventThreatDetectionCustomModule:string) { - return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render({ - organization: organization, - location: location, - effective_event_threat_detection_custom_module: effectiveEventThreatDetectionCustomModule, - }); - } - - /** - * Parse the organization from OrganizationLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} organizationLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing organization_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(organizationLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEffectiveEventThreatDetectionCustomModuleName).organization; - } - - /** - * Parse the location from OrganizationLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} organizationLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing organization_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(organizationLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEffectiveEventThreatDetectionCustomModuleName).location; - } - - /** - * Parse the effective_event_threat_detection_custom_module from OrganizationLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} organizationLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing organization_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the effective_event_threat_detection_custom_module. - */ - matchEffectiveEventThreatDetectionCustomModuleFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(organizationLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEffectiveEventThreatDetectionCustomModuleName).effective_event_threat_detection_custom_module; - } - - /** - * Return a fully-qualified organizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} effective_security_health_analytics_custom_module - * @returns {string} Resource name string. - */ - organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePath(organization:string,location:string,effectiveSecurityHealthAnalyticsCustomModule:string) { - return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render({ - organization: organization, - location: location, - effective_security_health_analytics_custom_module: effectiveSecurityHealthAnalyticsCustomModule, - }); - } - - /** - * Parse the organization from OrganizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing organization_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName).organization; - } - - /** - * Parse the location from OrganizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing organization_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName).location; - } - - /** - * Parse the effective_security_health_analytics_custom_module from OrganizationLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing organization_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the effective_security_health_analytics_custom_module. - */ - matchEffectiveSecurityHealthAnalyticsCustomModuleFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName).effective_security_health_analytics_custom_module; - } - - /** - * Return a fully-qualified organizationLocationEventThreatDetectionCustomModule resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} event_threat_detection_custom_module - * @returns {string} Resource name string. - */ - organizationLocationEventThreatDetectionCustomModulePath(organization:string,location:string,eventThreatDetectionCustomModule:string) { - return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.render({ - organization: organization, - location: location, - event_threat_detection_custom_module: eventThreatDetectionCustomModule, - }); - } - - /** - * Parse the organization from OrganizationLocationEventThreatDetectionCustomModule resource. - * - * @param {string} organizationLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing organization_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationEventThreatDetectionCustomModuleName(organizationLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEventThreatDetectionCustomModuleName).organization; - } - - /** - * Parse the location from OrganizationLocationEventThreatDetectionCustomModule resource. - * - * @param {string} organizationLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing organization_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationEventThreatDetectionCustomModuleName(organizationLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEventThreatDetectionCustomModuleName).location; - } - - /** - * Parse the event_threat_detection_custom_module from OrganizationLocationEventThreatDetectionCustomModule resource. - * - * @param {string} organizationLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing organization_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the event_threat_detection_custom_module. - */ - matchEventThreatDetectionCustomModuleFromOrganizationLocationEventThreatDetectionCustomModuleName(organizationLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match(organizationLocationEventThreatDetectionCustomModuleName).event_threat_detection_custom_module; - } - - /** - * Return a fully-qualified organizationLocationSecurityHealthAnalyticsCustomModule resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} security_health_analytics_custom_module - * @returns {string} Resource name string. - */ - organizationLocationSecurityHealthAnalyticsCustomModulePath(organization:string,location:string,securityHealthAnalyticsCustomModule:string) { - return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.render({ - organization: organization, - location: location, - security_health_analytics_custom_module: securityHealthAnalyticsCustomModule, - }); - } - - /** - * Parse the organization from OrganizationLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} organizationLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing organization_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(organizationLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationSecurityHealthAnalyticsCustomModuleName).organization; - } - - /** - * Parse the location from OrganizationLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} organizationLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing organization_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(organizationLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationSecurityHealthAnalyticsCustomModuleName).location; - } - - /** - * Parse the security_health_analytics_custom_module from OrganizationLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} organizationLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing organization_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the security_health_analytics_custom_module. - */ - matchSecurityHealthAnalyticsCustomModuleFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(organizationLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(organizationLocationSecurityHealthAnalyticsCustomModuleName).security_health_analytics_custom_module; - } - - /** - * Return a fully-qualified organizationLocationService resource name string. - * - * @param {string} organization - * @param {string} location - * @param {string} service - * @returns {string} Resource name string. - */ - organizationLocationServicePath(organization:string,location:string,service:string) { - return this.pathTemplates.organizationLocationServicePathTemplate.render({ - organization: organization, - location: location, - service: service, - }); - } - - /** - * Parse the organization from OrganizationLocationService resource. - * - * @param {string} organizationLocationServiceName - * A fully-qualified path representing organization_location_service resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationLocationServiceName(organizationLocationServiceName: string) { - return this.pathTemplates.organizationLocationServicePathTemplate.match(organizationLocationServiceName).organization; - } - - /** - * Parse the location from OrganizationLocationService resource. - * - * @param {string} organizationLocationServiceName - * A fully-qualified path representing organization_location_service resource. - * @returns {string} A string representing the location. - */ - matchLocationFromOrganizationLocationServiceName(organizationLocationServiceName: string) { - return this.pathTemplates.organizationLocationServicePathTemplate.match(organizationLocationServiceName).location; - } - - /** - * Parse the service from OrganizationLocationService resource. - * - * @param {string} organizationLocationServiceName - * A fully-qualified path representing organization_location_service resource. - * @returns {string} A string representing the service. - */ - matchServiceFromOrganizationLocationServiceName(organizationLocationServiceName: string) { - return this.pathTemplates.organizationLocationServicePathTemplate.match(organizationLocationServiceName).service; - } - - /** - * Return a fully-qualified organizationSourceFinding resource name string. - * - * @param {string} organization - * @param {string} source - * @param {string} finding - * @returns {string} Resource name string. - */ - organizationSourceFindingPath(organization:string,source:string,finding:string) { - return this.pathTemplates.organizationSourceFindingPathTemplate.render({ - organization: organization, - source: source, - finding: finding, - }); - } - - /** - * Parse the organization from OrganizationSourceFinding resource. - * - * @param {string} organizationSourceFindingName - * A fully-qualified path representing organization_source_finding resource. - * @returns {string} A string representing the organization. - */ - matchOrganizationFromOrganizationSourceFindingName(organizationSourceFindingName: string) { - return this.pathTemplates.organizationSourceFindingPathTemplate.match(organizationSourceFindingName).organization; - } - - /** - * Parse the source from OrganizationSourceFinding resource. - * - * @param {string} organizationSourceFindingName - * A fully-qualified path representing organization_source_finding resource. - * @returns {string} A string representing the source. - */ - matchSourceFromOrganizationSourceFindingName(organizationSourceFindingName: string) { - return this.pathTemplates.organizationSourceFindingPathTemplate.match(organizationSourceFindingName).source; - } - - /** - * Parse the finding from OrganizationSourceFinding resource. - * - * @param {string} organizationSourceFindingName - * A fully-qualified path representing organization_source_finding resource. - * @returns {string} A string representing the finding. - */ - matchFindingFromOrganizationSourceFindingName(organizationSourceFindingName: string) { - return this.pathTemplates.organizationSourceFindingPathTemplate.match(organizationSourceFindingName).finding; - } - - /** - * 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 projectLocationEffectiveEventThreatDetectionCustomModule resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} effective_event_threat_detection_custom_module - * @returns {string} Resource name string. - */ - projectLocationEffectiveEventThreatDetectionCustomModulePath(project:string,location:string,effectiveEventThreatDetectionCustomModule:string) { - return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render({ - project: project, - location: location, - effective_event_threat_detection_custom_module: effectiveEventThreatDetectionCustomModule, - }); - } - - /** - * Parse the project from ProjectLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} projectLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing project_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(projectLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(projectLocationEffectiveEventThreatDetectionCustomModuleName).project; - } - - /** - * Parse the location from ProjectLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} projectLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing project_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(projectLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(projectLocationEffectiveEventThreatDetectionCustomModuleName).location; - } - - /** - * Parse the effective_event_threat_detection_custom_module from ProjectLocationEffectiveEventThreatDetectionCustomModule resource. - * - * @param {string} projectLocationEffectiveEventThreatDetectionCustomModuleName - * A fully-qualified path representing project_location_effective_event_threat_detection_custom_module resource. - * @returns {string} A string representing the effective_event_threat_detection_custom_module. - */ - matchEffectiveEventThreatDetectionCustomModuleFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(projectLocationEffectiveEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match(projectLocationEffectiveEventThreatDetectionCustomModuleName).effective_event_threat_detection_custom_module; - } - - /** - * Return a fully-qualified projectLocationEffectiveSecurityHealthAnalyticsCustomModule resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} effective_security_health_analytics_custom_module - * @returns {string} Resource name string. - */ - projectLocationEffectiveSecurityHealthAnalyticsCustomModulePath(project:string,location:string,effectiveSecurityHealthAnalyticsCustomModule:string) { - return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render({ - project: project, - location: location, - effective_security_health_analytics_custom_module: effectiveSecurityHealthAnalyticsCustomModule, - }); - } - - /** - * Parse the project from ProjectLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing project_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName).project; - } - - /** - * Parse the location from ProjectLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing project_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName).location; - } - - /** - * Parse the effective_security_health_analytics_custom_module from ProjectLocationEffectiveSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing project_location_effective_security_health_analytics_custom_module resource. - * @returns {string} A string representing the effective_security_health_analytics_custom_module. - */ - matchEffectiveSecurityHealthAnalyticsCustomModuleFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationEffectiveSecurityHealthAnalyticsCustomModuleName).effective_security_health_analytics_custom_module; - } - - /** - * Return a fully-qualified projectLocationEventThreatDetectionCustomModule resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} event_threat_detection_custom_module - * @returns {string} Resource name string. - */ - projectLocationEventThreatDetectionCustomModulePath(project:string,location:string,eventThreatDetectionCustomModule:string) { - return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.render({ - project: project, - location: location, - event_threat_detection_custom_module: eventThreatDetectionCustomModule, - }); - } - - /** - * Parse the project from ProjectLocationEventThreatDetectionCustomModule resource. - * - * @param {string} projectLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing project_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationEventThreatDetectionCustomModuleName(projectLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match(projectLocationEventThreatDetectionCustomModuleName).project; - } - - /** - * Parse the location from ProjectLocationEventThreatDetectionCustomModule resource. - * - * @param {string} projectLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing project_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationEventThreatDetectionCustomModuleName(projectLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match(projectLocationEventThreatDetectionCustomModuleName).location; - } - - /** - * Parse the event_threat_detection_custom_module from ProjectLocationEventThreatDetectionCustomModule resource. - * - * @param {string} projectLocationEventThreatDetectionCustomModuleName - * A fully-qualified path representing project_location_event_threat_detection_custom_module resource. - * @returns {string} A string representing the event_threat_detection_custom_module. - */ - matchEventThreatDetectionCustomModuleFromProjectLocationEventThreatDetectionCustomModuleName(projectLocationEventThreatDetectionCustomModuleName: string) { - return this.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match(projectLocationEventThreatDetectionCustomModuleName).event_threat_detection_custom_module; - } - - /** - * Return a fully-qualified projectLocationSecurityHealthAnalyticsCustomModule resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} security_health_analytics_custom_module - * @returns {string} Resource name string. - */ - projectLocationSecurityHealthAnalyticsCustomModulePath(project:string,location:string,securityHealthAnalyticsCustomModule:string) { - return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.render({ - project: project, - location: location, - security_health_analytics_custom_module: securityHealthAnalyticsCustomModule, - }); - } - - /** - * Parse the project from ProjectLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} projectLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing project_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationSecurityHealthAnalyticsCustomModuleName(projectLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationSecurityHealthAnalyticsCustomModuleName).project; - } - - /** - * Parse the location from ProjectLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} projectLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing project_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationSecurityHealthAnalyticsCustomModuleName(projectLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationSecurityHealthAnalyticsCustomModuleName).location; - } - - /** - * Parse the security_health_analytics_custom_module from ProjectLocationSecurityHealthAnalyticsCustomModule resource. - * - * @param {string} projectLocationSecurityHealthAnalyticsCustomModuleName - * A fully-qualified path representing project_location_security_health_analytics_custom_module resource. - * @returns {string} A string representing the security_health_analytics_custom_module. - */ - matchSecurityHealthAnalyticsCustomModuleFromProjectLocationSecurityHealthAnalyticsCustomModuleName(projectLocationSecurityHealthAnalyticsCustomModuleName: string) { - return this.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match(projectLocationSecurityHealthAnalyticsCustomModuleName).security_health_analytics_custom_module; - } - - /** - * Return a fully-qualified projectLocationService resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} service - * @returns {string} Resource name string. - */ - projectLocationServicePath(project:string,location:string,service:string) { - return this.pathTemplates.projectLocationServicePathTemplate.render({ - project: project, - location: location, - service: service, - }); - } - - /** - * Parse the project from ProjectLocationService resource. - * - * @param {string} projectLocationServiceName - * A fully-qualified path representing project_location_service resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectLocationServiceName(projectLocationServiceName: string) { - return this.pathTemplates.projectLocationServicePathTemplate.match(projectLocationServiceName).project; - } - - /** - * Parse the location from ProjectLocationService resource. - * - * @param {string} projectLocationServiceName - * A fully-qualified path representing project_location_service resource. - * @returns {string} A string representing the location. - */ - matchLocationFromProjectLocationServiceName(projectLocationServiceName: string) { - return this.pathTemplates.projectLocationServicePathTemplate.match(projectLocationServiceName).location; - } - - /** - * Parse the service from ProjectLocationService resource. - * - * @param {string} projectLocationServiceName - * A fully-qualified path representing project_location_service resource. - * @returns {string} A string representing the service. - */ - matchServiceFromProjectLocationServiceName(projectLocationServiceName: string) { - return this.pathTemplates.projectLocationServicePathTemplate.match(projectLocationServiceName).service; - } - - /** - * Return a fully-qualified projectSourceFinding resource name string. - * - * @param {string} project - * @param {string} source - * @param {string} finding - * @returns {string} Resource name string. - */ - projectSourceFindingPath(project:string,source:string,finding:string) { - return this.pathTemplates.projectSourceFindingPathTemplate.render({ - project: project, - source: source, - finding: finding, - }); - } - - /** - * Parse the project from ProjectSourceFinding resource. - * - * @param {string} projectSourceFindingName - * A fully-qualified path representing project_source_finding resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectSourceFindingName(projectSourceFindingName: string) { - return this.pathTemplates.projectSourceFindingPathTemplate.match(projectSourceFindingName).project; - } - - /** - * Parse the source from ProjectSourceFinding resource. - * - * @param {string} projectSourceFindingName - * A fully-qualified path representing project_source_finding resource. - * @returns {string} A string representing the source. - */ - matchSourceFromProjectSourceFindingName(projectSourceFindingName: string) { - return this.pathTemplates.projectSourceFindingPathTemplate.match(projectSourceFindingName).source; - } - - /** - * Parse the finding from ProjectSourceFinding resource. - * - * @param {string} projectSourceFindingName - * A fully-qualified path representing project_source_finding resource. - * @returns {string} A string representing the finding. - */ - matchFindingFromProjectSourceFindingName(projectSourceFindingName: string) { - return this.pathTemplates.projectSourceFindingPathTemplate.match(projectSourceFindingName).finding; - } - - /** - * 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.securityCenterManagementStub && !this._terminated) { - return this.securityCenterManagementStub.then(stub => { - this._terminated = true; - stub.close(); - this.locationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json deleted file mode 100644 index 43150ddc2b5..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_client_config.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "interfaces": { - "google.cloud.securitycentermanagement.v1.SecurityCenterManagement": { - "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": { - "ListEffectiveSecurityHealthAnalyticsCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetEffectiveSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListSecurityHealthAnalyticsCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListDescendantSecurityHealthAnalyticsCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SimulateSecurityHealthAnalyticsCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListEffectiveEventThreatDetectionCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetEffectiveEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListEventThreatDetectionCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListDescendantEventThreatDetectionCustomModules": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "CreateEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ValidateEventThreatDetectionCustomModule": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetSecurityCenterService": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListSecurityCenterServices": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateSecurityCenterService": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json deleted file mode 100644 index df6fdefe685..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/src/v1/security_center_management_proto_list.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "../../protos/google/cloud/securitycentermanagement/v1/security_center_management.proto" -] diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 3ed7b49ec97..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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 securitycentermanagement = require('@google-cloud/securitycentermanagement'); - -function main() { - const securityCenterManagementClient = new securitycentermanagement.SecurityCenterManagementClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 610c458b730..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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 {SecurityCenterManagementClient} from '@google-cloud/securitycentermanagement'; - -// check that the client class type name can be used -function doStuffWithSecurityCenterManagementClient(client: SecurityCenterManagementClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const securityCenterManagementClient = new SecurityCenterManagementClient(); - doStuffWithSecurityCenterManagementClient(securityCenterManagementClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/install.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts b/owl-bot-staging/google-cloud-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts deleted file mode 100644 index 07208b295f3..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/v1/test/gapic_security_center_management_v1.ts +++ /dev/null @@ -1,4633 +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 securitycentermanagementModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, 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 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.SecurityCenterManagementClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'securitycentermanagement.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient(); - 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 = securitycentermanagementModule.v1.SecurityCenterManagementClient.servicePath; - assert.strictEqual(servicePath, 'securitycentermanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = securitycentermanagementModule.v1.SecurityCenterManagementClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'securitycentermanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'securitycentermanagement.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'securitycentermanagement.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 securitycentermanagementModule.v1.SecurityCenterManagementClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'securitycentermanagement.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 securitycentermanagementModule.v1.SecurityCenterManagementClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'securitycentermanagement.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 securitycentermanagementModule.v1.SecurityCenterManagementClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = securitycentermanagementModule.v1.SecurityCenterManagementClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.securityCenterManagementStub, undefined); - await client.initialize(); - assert(client.securityCenterManagementStub); - }); - - it('has close method for the initialized client', done => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.securityCenterManagementStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.securityCenterManagementStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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('getEffectiveSecurityHealthAnalyticsCustomModule', () => { - it('invokes getEffectiveSecurityHealthAnalyticsCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.getEffectiveSecurityHealthAnalyticsCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEffectiveSecurityHealthAnalyticsCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEffectiveSecurityHealthAnalyticsCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEffectiveSecurityHealthAnalyticsCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEffectiveSecurityHealthAnalyticsCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEffectiveSecurityHealthAnalyticsCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEffectiveSecurityHealthAnalyticsCustomModule(request), expectedError); - }); - }); - - describe('getSecurityHealthAnalyticsCustomModule', () => { - it('invokes getSecurityHealthAnalyticsCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.getSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.getSecurityHealthAnalyticsCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSecurityHealthAnalyticsCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.getSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getSecurityHealthAnalyticsCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSecurityHealthAnalyticsCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getSecurityHealthAnalyticsCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSecurityHealthAnalyticsCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getSecurityHealthAnalyticsCustomModule(request), expectedError); - }); - }); - - describe('createSecurityHealthAnalyticsCustomModule', () => { - it('invokes createSecurityHealthAnalyticsCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.createSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.createSecurityHealthAnalyticsCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createSecurityHealthAnalyticsCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.createSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createSecurityHealthAnalyticsCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createSecurityHealthAnalyticsCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createSecurityHealthAnalyticsCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createSecurityHealthAnalyticsCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createSecurityHealthAnalyticsCustomModule(request), expectedError); - }); - }); - - describe('updateSecurityHealthAnalyticsCustomModule', () => { - it('invokes updateSecurityHealthAnalyticsCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() - ); - request.securityHealthAnalyticsCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); - request.securityHealthAnalyticsCustomModule.name = defaultValue1; - const expectedHeaderRequestParams = `security_health_analytics_custom_module.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.updateSecurityHealthAnalyticsCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSecurityHealthAnalyticsCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() - ); - request.securityHealthAnalyticsCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); - request.securityHealthAnalyticsCustomModule.name = defaultValue1; - const expectedHeaderRequestParams = `security_health_analytics_custom_module.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule() - ); - client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateSecurityHealthAnalyticsCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSecurityHealthAnalyticsCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() - ); - request.securityHealthAnalyticsCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); - request.securityHealthAnalyticsCustomModule.name = defaultValue1; - const expectedHeaderRequestParams = `security_health_analytics_custom_module.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateSecurityHealthAnalyticsCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSecurityHealthAnalyticsCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest() - ); - request.securityHealthAnalyticsCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityHealthAnalyticsCustomModuleRequest', ['securityHealthAnalyticsCustomModule', 'name']); - request.securityHealthAnalyticsCustomModule.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateSecurityHealthAnalyticsCustomModule(request), expectedError); - }); - }); - - describe('deleteSecurityHealthAnalyticsCustomModule', () => { - it('invokes deleteSecurityHealthAnalyticsCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.deleteSecurityHealthAnalyticsCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteSecurityHealthAnalyticsCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteSecurityHealthAnalyticsCustomModule( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteSecurityHealthAnalyticsCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteSecurityHealthAnalyticsCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteSecurityHealthAnalyticsCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteSecurityHealthAnalyticsCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteSecurityHealthAnalyticsCustomModule(request), expectedError); - }); - }); - - describe('simulateSecurityHealthAnalyticsCustomModule', () => { - it('invokes simulateSecurityHealthAnalyticsCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse() - ); - client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.simulateSecurityHealthAnalyticsCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes simulateSecurityHealthAnalyticsCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleResponse() - ); - client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.simulateSecurityHealthAnalyticsCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISimulateSecurityHealthAnalyticsCustomModuleResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes simulateSecurityHealthAnalyticsCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.simulateSecurityHealthAnalyticsCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.simulateSecurityHealthAnalyticsCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes simulateSecurityHealthAnalyticsCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.simulateSecurityHealthAnalyticsCustomModule(request), expectedError); - }); - }); - - describe('getEffectiveEventThreatDetectionCustomModule', () => { - it('invokes getEffectiveEventThreatDetectionCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule() - ); - client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.getEffectiveEventThreatDetectionCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEffectiveEventThreatDetectionCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule() - ); - client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEffectiveEventThreatDetectionCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEffectiveEventThreatDetectionCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEffectiveEventThreatDetectionCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEffectiveEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEffectiveEventThreatDetectionCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEffectiveEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEffectiveEventThreatDetectionCustomModule(request), expectedError); - }); - }); - - describe('getEventThreatDetectionCustomModule', () => { - it('invokes getEventThreatDetectionCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() - ); - client.innerApiCalls.getEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.getEventThreatDetectionCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEventThreatDetectionCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() - ); - client.innerApiCalls.getEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEventThreatDetectionCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEventThreatDetectionCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEventThreatDetectionCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEventThreatDetectionCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEventThreatDetectionCustomModule(request), expectedError); - }); - }); - - describe('createEventThreatDetectionCustomModule', () => { - it('invokes createEventThreatDetectionCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() - ); - client.innerApiCalls.createEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.createEventThreatDetectionCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEventThreatDetectionCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() - ); - client.innerApiCalls.createEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEventThreatDetectionCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEventThreatDetectionCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createEventThreatDetectionCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEventThreatDetectionCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.CreateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createEventThreatDetectionCustomModule(request), expectedError); - }); - }); - - describe('updateEventThreatDetectionCustomModule', () => { - it('invokes updateEventThreatDetectionCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() - ); - request.eventThreatDetectionCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); - request.eventThreatDetectionCustomModule.name = defaultValue1; - const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() - ); - client.innerApiCalls.updateEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.updateEventThreatDetectionCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEventThreatDetectionCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() - ); - request.eventThreatDetectionCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); - request.eventThreatDetectionCustomModule.name = defaultValue1; - const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule() - ); - client.innerApiCalls.updateEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEventThreatDetectionCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEventThreatDetectionCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() - ); - request.eventThreatDetectionCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); - request.eventThreatDetectionCustomModule.name = defaultValue1; - const expectedHeaderRequestParams = `event_threat_detection_custom_module.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateEventThreatDetectionCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEventThreatDetectionCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest() - ); - request.eventThreatDetectionCustomModule ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateEventThreatDetectionCustomModuleRequest', ['eventThreatDetectionCustomModule', 'name']); - request.eventThreatDetectionCustomModule.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateEventThreatDetectionCustomModule(request), expectedError); - }); - }); - - describe('deleteEventThreatDetectionCustomModule', () => { - it('invokes deleteEventThreatDetectionCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.deleteEventThreatDetectionCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEventThreatDetectionCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEventThreatDetectionCustomModule( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEventThreatDetectionCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteEventThreatDetectionCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEventThreatDetectionCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.DeleteEventThreatDetectionCustomModuleRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteEventThreatDetectionCustomModule(request), expectedError); - }); - }); - - describe('validateEventThreatDetectionCustomModule', () => { - it('invokes validateEventThreatDetectionCustomModule without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse() - ); - client.innerApiCalls.validateEventThreatDetectionCustomModule = stubSimpleCall(expectedResponse); - const [response] = await client.validateEventThreatDetectionCustomModule(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes validateEventThreatDetectionCustomModule without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleResponse() - ); - client.innerApiCalls.validateEventThreatDetectionCustomModule = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.validateEventThreatDetectionCustomModule( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IValidateEventThreatDetectionCustomModuleResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes validateEventThreatDetectionCustomModule with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.validateEventThreatDetectionCustomModule = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.validateEventThreatDetectionCustomModule(request), expectedError); - const actualRequest = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.validateEventThreatDetectionCustomModule as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes validateEventThreatDetectionCustomModule with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ValidateEventThreatDetectionCustomModuleRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.validateEventThreatDetectionCustomModule(request), expectedError); - }); - }); - - describe('getSecurityCenterService', () => { - it('invokes getSecurityCenterService without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() - ); - client.innerApiCalls.getSecurityCenterService = stubSimpleCall(expectedResponse); - const [response] = await client.getSecurityCenterService(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getSecurityCenterService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSecurityCenterService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSecurityCenterService without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() - ); - client.innerApiCalls.getSecurityCenterService = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getSecurityCenterService( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getSecurityCenterService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSecurityCenterService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSecurityCenterService with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getSecurityCenterService = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getSecurityCenterService(request), expectedError); - const actualRequest = (client.innerApiCalls.getSecurityCenterService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getSecurityCenterService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getSecurityCenterService with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.GetSecurityCenterServiceRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getSecurityCenterService(request), expectedError); - }); - }); - - describe('updateSecurityCenterService', () => { - it('invokes updateSecurityCenterService without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() - ); - request.securityCenterService ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); - request.securityCenterService.name = defaultValue1; - const expectedHeaderRequestParams = `security_center_service.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() - ); - client.innerApiCalls.updateSecurityCenterService = stubSimpleCall(expectedResponse); - const [response] = await client.updateSecurityCenterService(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateSecurityCenterService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityCenterService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSecurityCenterService without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() - ); - request.securityCenterService ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); - request.securityCenterService.name = defaultValue1; - const expectedHeaderRequestParams = `security_center_service.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService() - ); - client.innerApiCalls.updateSecurityCenterService = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateSecurityCenterService( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateSecurityCenterService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityCenterService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSecurityCenterService with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() - ); - request.securityCenterService ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); - request.securityCenterService.name = defaultValue1; - const expectedHeaderRequestParams = `security_center_service.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateSecurityCenterService = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateSecurityCenterService(request), expectedError); - const actualRequest = (client.innerApiCalls.updateSecurityCenterService as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateSecurityCenterService as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateSecurityCenterService with closed client', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest() - ); - request.securityCenterService ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.UpdateSecurityCenterServiceRequest', ['securityCenterService', 'name']); - request.securityCenterService.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateSecurityCenterService(request), expectedError); - }); - }); - - describe('listEffectiveSecurityHealthAnalyticsCustomModules', () => { - it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - ]; - client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = stubSimpleCall(expectedResponse); - const [response] = await client.listEffectiveSecurityHealthAnalyticsCustomModules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEffectiveSecurityHealthAnalyticsCustomModules without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - ]; - client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEffectiveSecurityHealthAnalyticsCustomModules( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEffectiveSecurityHealthAnalyticsCustomModules(request), expectedError); - const actualRequest = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - ]; - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) => { - 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.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules, request)); - assert( - (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEffectiveSecurityHealthAnalyticsCustomModulesStream with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEffectiveSecurityHealthAnalyticsCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEffectiveSecurityHealthAnalyticsCustomModules, request)); - assert( - (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule()), - ]; - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = []; - const iterable = client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEffectiveSecurityHealthAnalyticsCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEffectiveSecurityHealthAnalyticsCustomModulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveSecurityHealthAnalyticsCustomModule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEffectiveSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listSecurityHealthAnalyticsCustomModules', () => { - it('invokes listSecurityHealthAnalyticsCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = stubSimpleCall(expectedResponse); - const [response] = await client.listSecurityHealthAnalyticsCustomModules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSecurityHealthAnalyticsCustomModules without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listSecurityHealthAnalyticsCustomModules( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSecurityHealthAnalyticsCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listSecurityHealthAnalyticsCustomModules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listSecurityHealthAnalyticsCustomModules(request), expectedError); - const actualRequest = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSecurityHealthAnalyticsCustomModulesStream without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSecurityHealthAnalyticsCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { - 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.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, request)); - assert( - (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listSecurityHealthAnalyticsCustomModulesStream with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listSecurityHealthAnalyticsCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSecurityHealthAnalyticsCustomModules, request)); - assert( - (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSecurityHealthAnalyticsCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; - const iterable = client.listSecurityHealthAnalyticsCustomModulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSecurityHealthAnalyticsCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listSecurityHealthAnalyticsCustomModulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDescendantSecurityHealthAnalyticsCustomModules', () => { - it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = stubSimpleCall(expectedResponse); - const [response] = await client.listDescendantSecurityHealthAnalyticsCustomModules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDescendantSecurityHealthAnalyticsCustomModules without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDescendantSecurityHealthAnalyticsCustomModules( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDescendantSecurityHealthAnalyticsCustomModules(request), expectedError); - const actualRequest = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDescendantSecurityHealthAnalyticsCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { - 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.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules, request)); - assert( - (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDescendantSecurityHealthAnalyticsCustomModulesStream with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDescendantSecurityHealthAnalyticsCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDescendantSecurityHealthAnalyticsCustomModules, request)); - assert( - (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule()), - ]; - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; - const iterable = client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDescendantSecurityHealthAnalyticsCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantSecurityHealthAnalyticsCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDescendantSecurityHealthAnalyticsCustomModulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityHealthAnalyticsCustomModule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDescendantSecurityHealthAnalyticsCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listEffectiveEventThreatDetectionCustomModules', () => { - it('invokes listEffectiveEventThreatDetectionCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - ]; - client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); - const [response] = await client.listEffectiveEventThreatDetectionCustomModules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEffectiveEventThreatDetectionCustomModules without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - ]; - client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEffectiveEventThreatDetectionCustomModules( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEffectiveEventThreatDetectionCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEffectiveEventThreatDetectionCustomModules(request), expectedError); - const actualRequest = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEffectiveEventThreatDetectionCustomModulesStream without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - ]; - client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEffectiveEventThreatDetectionCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) => { - 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.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules, request)); - assert( - (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEffectiveEventThreatDetectionCustomModulesStream with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEffectiveEventThreatDetectionCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEffectiveEventThreatDetectionCustomModules, request)); - assert( - (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEffectiveEventThreatDetectionCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule()), - ]; - client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[] = []; - const iterable = client.listEffectiveEventThreatDetectionCustomModulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEffectiveEventThreatDetectionCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEffectiveEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEffectiveEventThreatDetectionCustomModulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.securitycentermanagement.v1.IEffectiveEventThreatDetectionCustomModule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEffectiveEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listEventThreatDetectionCustomModules', () => { - it('invokes listEventThreatDetectionCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); - const [response] = await client.listEventThreatDetectionCustomModules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEventThreatDetectionCustomModules without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEventThreatDetectionCustomModules( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEventThreatDetectionCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEventThreatDetectionCustomModules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEventThreatDetectionCustomModules(request), expectedError); - const actualRequest = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEventThreatDetectionCustomModulesStream without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.descriptors.page.listEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEventThreatDetectionCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { - 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.listEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEventThreatDetectionCustomModules, request)); - assert( - (client.descriptors.page.listEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEventThreatDetectionCustomModulesStream with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEventThreatDetectionCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEventThreatDetectionCustomModules, request)); - assert( - (client.descriptors.page.listEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEventThreatDetectionCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; - const iterable = client.listEventThreatDetectionCustomModulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEventThreatDetectionCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEventThreatDetectionCustomModulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDescendantEventThreatDetectionCustomModules', () => { - it('invokes listDescendantEventThreatDetectionCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = stubSimpleCall(expectedResponse); - const [response] = await client.listDescendantEventThreatDetectionCustomModules(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDescendantEventThreatDetectionCustomModules without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDescendantEventThreatDetectionCustomModules( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDescendantEventThreatDetectionCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDescendantEventThreatDetectionCustomModules = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDescendantEventThreatDetectionCustomModules(request), expectedError); - const actualRequest = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDescendantEventThreatDetectionCustomModules as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDescendantEventThreatDetectionCustomModulesStream without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDescendantEventThreatDetectionCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { - 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.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDescendantEventThreatDetectionCustomModules, request)); - assert( - (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDescendantEventThreatDetectionCustomModulesStream with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDescendantEventThreatDetectionCustomModulesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDescendantEventThreatDetectionCustomModules, request)); - assert( - (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDescendantEventThreatDetectionCustomModules without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule()), - ]; - client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; - const iterable = client.listDescendantEventThreatDetectionCustomModulesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDescendantEventThreatDetectionCustomModules with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListDescendantEventThreatDetectionCustomModulesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDescendantEventThreatDetectionCustomModulesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.securitycentermanagement.v1.IEventThreatDetectionCustomModule[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDescendantEventThreatDetectionCustomModules.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listSecurityCenterServices', () => { - it('invokes listSecurityCenterServices without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - ]; - client.innerApiCalls.listSecurityCenterServices = stubSimpleCall(expectedResponse); - const [response] = await client.listSecurityCenterServices(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSecurityCenterServices as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSecurityCenterServices as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSecurityCenterServices without error using callback', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - ]; - client.innerApiCalls.listSecurityCenterServices = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listSecurityCenterServices( - request, - (err?: Error|null, result?: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listSecurityCenterServices as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSecurityCenterServices as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSecurityCenterServices with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listSecurityCenterServices = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listSecurityCenterServices(request), expectedError); - const actualRequest = (client.innerApiCalls.listSecurityCenterServices as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listSecurityCenterServices as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listSecurityCenterServicesStream without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - ]; - client.descriptors.page.listSecurityCenterServices.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listSecurityCenterServicesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService) => { - 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.listSecurityCenterServices.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSecurityCenterServices, request)); - assert( - (client.descriptors.page.listSecurityCenterServices.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listSecurityCenterServicesStream with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listSecurityCenterServices.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listSecurityCenterServicesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService[] = []; - stream.on('data', (response: protos.google.cloud.securitycentermanagement.v1.SecurityCenterService) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listSecurityCenterServices.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listSecurityCenterServices, request)); - assert( - (client.descriptors.page.listSecurityCenterServices.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSecurityCenterServices without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - generateSampleMessage(new protos.google.cloud.securitycentermanagement.v1.SecurityCenterService()), - ]; - client.descriptors.page.listSecurityCenterServices.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[] = []; - const iterable = client.listSecurityCenterServicesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listSecurityCenterServices with error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.securitycentermanagement.v1.ListSecurityCenterServicesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listSecurityCenterServices.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listSecurityCenterServicesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.securitycentermanagement.v1.ISecurityCenterService[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listSecurityCenterServices.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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 securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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('Path templates', () => { - - describe('folderLocationEffectiveEventThreatDetectionCustomModule', () => { - const fakePath = "/rendered/path/folderLocationEffectiveEventThreatDetectionCustomModule"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - effective_event_threat_detection_custom_module: "effectiveEventThreatDetectionCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationEffectiveEventThreatDetectionCustomModulePath', () => { - const result = client.folderLocationEffectiveEventThreatDetectionCustomModulePath("folderValue", "locationValue", "effectiveEventThreatDetectionCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchFolderFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchLocationFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEffectiveEventThreatDetectionCustomModuleFromFolderLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchEffectiveEventThreatDetectionCustomModuleFromFolderLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "effectiveEventThreatDetectionCustomModuleValue"); - assert((client.pathTemplates.folderLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { - const fakePath = "/rendered/path/folderLocationEffectiveSecurityHealthAnalyticsCustomModule"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - effective_security_health_analytics_custom_module: "effectiveSecurityHealthAnalyticsCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationEffectiveSecurityHealthAnalyticsCustomModulePath', () => { - const result = client.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePath("folderValue", "locationValue", "effectiveSecurityHealthAnalyticsCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchFolderFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchLocationFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEffectiveSecurityHealthAnalyticsCustomModuleFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchEffectiveSecurityHealthAnalyticsCustomModuleFromFolderLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "effectiveSecurityHealthAnalyticsCustomModuleValue"); - assert((client.pathTemplates.folderLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationEventThreatDetectionCustomModule', () => { - const fakePath = "/rendered/path/folderLocationEventThreatDetectionCustomModule"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - event_threat_detection_custom_module: "eventThreatDetectionCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationEventThreatDetectionCustomModulePath', () => { - const result = client.folderLocationEventThreatDetectionCustomModulePath("folderValue", "locationValue", "eventThreatDetectionCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchFolderFromFolderLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchLocationFromFolderLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEventThreatDetectionCustomModuleFromFolderLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchEventThreatDetectionCustomModuleFromFolderLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "eventThreatDetectionCustomModuleValue"); - assert((client.pathTemplates.folderLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationSecurityHealthAnalyticsCustomModule', () => { - const fakePath = "/rendered/path/folderLocationSecurityHealthAnalyticsCustomModule"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - security_health_analytics_custom_module: "securityHealthAnalyticsCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationSecurityHealthAnalyticsCustomModulePath', () => { - const result = client.folderLocationSecurityHealthAnalyticsCustomModulePath("folderValue", "locationValue", "securityHealthAnalyticsCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchFolderFromFolderLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchLocationFromFolderLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSecurityHealthAnalyticsCustomModuleFromFolderLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchSecurityHealthAnalyticsCustomModuleFromFolderLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "securityHealthAnalyticsCustomModuleValue"); - assert((client.pathTemplates.folderLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderLocationService', () => { - const fakePath = "/rendered/path/folderLocationService"; - const expectedParameters = { - folder: "folderValue", - location: "locationValue", - service: "serviceValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.folderLocationServicePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderLocationServicePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderLocationServicePath', () => { - const result = client.folderLocationServicePath("folderValue", "locationValue", "serviceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderLocationServicePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderLocationServiceName', () => { - const result = client.matchFolderFromFolderLocationServiceName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromFolderLocationServiceName', () => { - const result = client.matchLocationFromFolderLocationServiceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.folderLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchServiceFromFolderLocationServiceName', () => { - const result = client.matchServiceFromFolderLocationServiceName(fakePath); - assert.strictEqual(result, "serviceValue"); - assert((client.pathTemplates.folderLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('folderSourceFinding', () => { - const fakePath = "/rendered/path/folderSourceFinding"; - const expectedParameters = { - folder: "folderValue", - source: "sourceValue", - finding: "findingValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.folderSourceFindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.folderSourceFindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('folderSourceFindingPath', () => { - const result = client.folderSourceFindingPath("folderValue", "sourceValue", "findingValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.folderSourceFindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchFolderFromFolderSourceFindingName', () => { - const result = client.matchFolderFromFolderSourceFindingName(fakePath); - assert.strictEqual(result, "folderValue"); - assert((client.pathTemplates.folderSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSourceFromFolderSourceFindingName', () => { - const result = client.matchSourceFromFolderSourceFindingName(fakePath); - assert.strictEqual(result, "sourceValue"); - assert((client.pathTemplates.folderSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingFromFolderSourceFindingName', () => { - const result = client.matchFindingFromFolderSourceFindingName(fakePath); - assert.strictEqual(result, "findingValue"); - assert((client.pathTemplates.folderSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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('organization', () => { - const fakePath = "/rendered/path/organization"; - const expectedParameters = { - organization: "organizationValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationPath', () => { - const result = client.organizationPath("organizationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationName', () => { - const result = client.matchOrganizationFromOrganizationName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocation', () => { - const fakePath = "/rendered/path/organizationLocation"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationLocationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationPath', () => { - const result = client.organizationLocationPath("organizationValue", "locationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationName', () => { - const result = client.matchOrganizationFromOrganizationLocationName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationName', () => { - const result = client.matchLocationFromOrganizationLocationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationEffectiveEventThreatDetectionCustomModule', () => { - const fakePath = "/rendered/path/organizationLocationEffectiveEventThreatDetectionCustomModule"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - effective_event_threat_detection_custom_module: "effectiveEventThreatDetectionCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationEffectiveEventThreatDetectionCustomModulePath', () => { - const result = client.organizationLocationEffectiveEventThreatDetectionCustomModulePath("organizationValue", "locationValue", "effectiveEventThreatDetectionCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchOrganizationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchLocationFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEffectiveEventThreatDetectionCustomModuleFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchEffectiveEventThreatDetectionCustomModuleFromOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "effectiveEventThreatDetectionCustomModuleValue"); - assert((client.pathTemplates.organizationLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { - const fakePath = "/rendered/path/organizationLocationEffectiveSecurityHealthAnalyticsCustomModule"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - effective_security_health_analytics_custom_module: "effectiveSecurityHealthAnalyticsCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePath', () => { - const result = client.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePath("organizationValue", "locationValue", "effectiveSecurityHealthAnalyticsCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchOrganizationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchLocationFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEffectiveSecurityHealthAnalyticsCustomModuleFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchEffectiveSecurityHealthAnalyticsCustomModuleFromOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "effectiveSecurityHealthAnalyticsCustomModuleValue"); - assert((client.pathTemplates.organizationLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationEventThreatDetectionCustomModule', () => { - const fakePath = "/rendered/path/organizationLocationEventThreatDetectionCustomModule"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - event_threat_detection_custom_module: "eventThreatDetectionCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationEventThreatDetectionCustomModulePath', () => { - const result = client.organizationLocationEventThreatDetectionCustomModulePath("organizationValue", "locationValue", "eventThreatDetectionCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchOrganizationFromOrganizationLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchLocationFromOrganizationLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEventThreatDetectionCustomModuleFromOrganizationLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchEventThreatDetectionCustomModuleFromOrganizationLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "eventThreatDetectionCustomModuleValue"); - assert((client.pathTemplates.organizationLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationSecurityHealthAnalyticsCustomModule', () => { - const fakePath = "/rendered/path/organizationLocationSecurityHealthAnalyticsCustomModule"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - security_health_analytics_custom_module: "securityHealthAnalyticsCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationSecurityHealthAnalyticsCustomModulePath', () => { - const result = client.organizationLocationSecurityHealthAnalyticsCustomModulePath("organizationValue", "locationValue", "securityHealthAnalyticsCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchOrganizationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchLocationFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSecurityHealthAnalyticsCustomModuleFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchSecurityHealthAnalyticsCustomModuleFromOrganizationLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "securityHealthAnalyticsCustomModuleValue"); - assert((client.pathTemplates.organizationLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationLocationService', () => { - const fakePath = "/rendered/path/organizationLocationService"; - const expectedParameters = { - organization: "organizationValue", - location: "locationValue", - service: "serviceValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationLocationServicePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationLocationServicePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationLocationServicePath', () => { - const result = client.organizationLocationServicePath("organizationValue", "locationValue", "serviceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationLocationServicePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationLocationServiceName', () => { - const result = client.matchOrganizationFromOrganizationLocationServiceName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromOrganizationLocationServiceName', () => { - const result = client.matchLocationFromOrganizationLocationServiceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.organizationLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchServiceFromOrganizationLocationServiceName', () => { - const result = client.matchServiceFromOrganizationLocationServiceName(fakePath); - assert.strictEqual(result, "serviceValue"); - assert((client.pathTemplates.organizationLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('organizationSourceFinding', () => { - const fakePath = "/rendered/path/organizationSourceFinding"; - const expectedParameters = { - organization: "organizationValue", - source: "sourceValue", - finding: "findingValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.organizationSourceFindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.organizationSourceFindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('organizationSourceFindingPath', () => { - const result = client.organizationSourceFindingPath("organizationValue", "sourceValue", "findingValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.organizationSourceFindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchOrganizationFromOrganizationSourceFindingName', () => { - const result = client.matchOrganizationFromOrganizationSourceFindingName(fakePath); - assert.strictEqual(result, "organizationValue"); - assert((client.pathTemplates.organizationSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSourceFromOrganizationSourceFindingName', () => { - const result = client.matchSourceFromOrganizationSourceFindingName(fakePath); - assert.strictEqual(result, "sourceValue"); - assert((client.pathTemplates.organizationSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingFromOrganizationSourceFindingName', () => { - const result = client.matchFindingFromOrganizationSourceFindingName(fakePath); - assert.strictEqual(result, "findingValue"); - assert((client.pathTemplates.organizationSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - 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('projectLocationEffectiveEventThreatDetectionCustomModule', () => { - const fakePath = "/rendered/path/projectLocationEffectiveEventThreatDetectionCustomModule"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - effective_event_threat_detection_custom_module: "effectiveEventThreatDetectionCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationEffectiveEventThreatDetectionCustomModulePath', () => { - const result = client.projectLocationEffectiveEventThreatDetectionCustomModulePath("projectValue", "locationValue", "effectiveEventThreatDetectionCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchProjectFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchLocationFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEffectiveEventThreatDetectionCustomModuleFromProjectLocationEffectiveEventThreatDetectionCustomModuleName', () => { - const result = client.matchEffectiveEventThreatDetectionCustomModuleFromProjectLocationEffectiveEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "effectiveEventThreatDetectionCustomModuleValue"); - assert((client.pathTemplates.projectLocationEffectiveEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationEffectiveSecurityHealthAnalyticsCustomModule', () => { - const fakePath = "/rendered/path/projectLocationEffectiveSecurityHealthAnalyticsCustomModule"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - effective_security_health_analytics_custom_module: "effectiveSecurityHealthAnalyticsCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationEffectiveSecurityHealthAnalyticsCustomModulePath', () => { - const result = client.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePath("projectValue", "locationValue", "effectiveSecurityHealthAnalyticsCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchProjectFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchLocationFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEffectiveSecurityHealthAnalyticsCustomModuleFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchEffectiveSecurityHealthAnalyticsCustomModuleFromProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "effectiveSecurityHealthAnalyticsCustomModuleValue"); - assert((client.pathTemplates.projectLocationEffectiveSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationEventThreatDetectionCustomModule', () => { - const fakePath = "/rendered/path/projectLocationEventThreatDetectionCustomModule"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - event_threat_detection_custom_module: "eventThreatDetectionCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationEventThreatDetectionCustomModulePath', () => { - const result = client.projectLocationEventThreatDetectionCustomModulePath("projectValue", "locationValue", "eventThreatDetectionCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchProjectFromProjectLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchLocationFromProjectLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEventThreatDetectionCustomModuleFromProjectLocationEventThreatDetectionCustomModuleName', () => { - const result = client.matchEventThreatDetectionCustomModuleFromProjectLocationEventThreatDetectionCustomModuleName(fakePath); - assert.strictEqual(result, "eventThreatDetectionCustomModuleValue"); - assert((client.pathTemplates.projectLocationEventThreatDetectionCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationSecurityHealthAnalyticsCustomModule', () => { - const fakePath = "/rendered/path/projectLocationSecurityHealthAnalyticsCustomModule"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - security_health_analytics_custom_module: "securityHealthAnalyticsCustomModuleValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationSecurityHealthAnalyticsCustomModulePath', () => { - const result = client.projectLocationSecurityHealthAnalyticsCustomModulePath("projectValue", "locationValue", "securityHealthAnalyticsCustomModuleValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchProjectFromProjectLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchLocationFromProjectLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSecurityHealthAnalyticsCustomModuleFromProjectLocationSecurityHealthAnalyticsCustomModuleName', () => { - const result = client.matchSecurityHealthAnalyticsCustomModuleFromProjectLocationSecurityHealthAnalyticsCustomModuleName(fakePath); - assert.strictEqual(result, "securityHealthAnalyticsCustomModuleValue"); - assert((client.pathTemplates.projectLocationSecurityHealthAnalyticsCustomModulePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectLocationService', () => { - const fakePath = "/rendered/path/projectLocationService"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - service: "serviceValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectLocationServicePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectLocationServicePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectLocationServicePath', () => { - const result = client.projectLocationServicePath("projectValue", "locationValue", "serviceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectLocationServicePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectLocationServiceName', () => { - const result = client.matchProjectFromProjectLocationServiceName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromProjectLocationServiceName', () => { - const result = client.matchLocationFromProjectLocationServiceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.projectLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchServiceFromProjectLocationServiceName', () => { - const result = client.matchServiceFromProjectLocationServiceName(fakePath); - assert.strictEqual(result, "serviceValue"); - assert((client.pathTemplates.projectLocationServicePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('projectSourceFinding', () => { - const fakePath = "/rendered/path/projectSourceFinding"; - const expectedParameters = { - project: "projectValue", - source: "sourceValue", - finding: "findingValue", - }; - const client = new securitycentermanagementModule.v1.SecurityCenterManagementClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectSourceFindingPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectSourceFindingPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectSourceFindingPath', () => { - const result = client.projectSourceFindingPath("projectValue", "sourceValue", "findingValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectSourceFindingPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectSourceFindingName', () => { - const result = client.matchProjectFromProjectSourceFindingName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchSourceFromProjectSourceFindingName', () => { - const result = client.matchSourceFromProjectSourceFindingName(fakePath); - assert.strictEqual(result, "sourceValue"); - assert((client.pathTemplates.projectSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchFindingFromProjectSourceFindingName', () => { - const result = client.matchFindingFromProjectSourceFindingName(fakePath); - assert.strictEqual(result, "findingValue"); - assert((client.pathTemplates.projectSourceFindingPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-securitycentermanagement/v1/tsconfig.json b/owl-bot-staging/google-cloud-securitycentermanagement/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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-securitycentermanagement/v1/webpack.config.js b/owl-bot-staging/google-cloud-securitycentermanagement/v1/webpack.config.js deleted file mode 100644 index ab2a70eee26..00000000000 --- a/owl-bot-staging/google-cloud-securitycentermanagement/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: 'SecurityCenterManagement', - filename: './security-center-management.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-eventarc-publishing/README.md b/packages/google-cloud-eventarc-publishing/README.md index d3a13d7e2f4..2a535cae642 100644 --- a/packages/google-cloud-eventarc-publishing/README.md +++ b/packages/google-cloud-eventarc-publishing/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Eventarc Publishing API API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -62,6 +62,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Publisher.publish | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js,packages/google-cloud-eventarc-publishing/samples/README.md) | | Publisher.publish_channel_connection_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_channel_connection_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_channel_connection_events.js,packages/google-cloud-eventarc-publishing/samples/README.md) | | Publisher.publish_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_events.js,packages/google-cloud-eventarc-publishing/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/quickstart.js,packages/google-cloud-eventarc-publishing/samples/README.md) | @@ -134,4 +135,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=eventarcpublishing.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto b/packages/google-cloud-eventarc-publishing/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto similarity index 100% rename from owl-bot-staging/google-cloud-eventarc-publishing/v1/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto rename to packages/google-cloud-eventarc-publishing/protos/google/cloud/eventarc/publishing/v1/cloud_event.proto diff --git a/packages/google-cloud-eventarc-publishing/protos/google/cloud/eventarc/publishing/v1/publisher.proto b/packages/google-cloud-eventarc-publishing/protos/google/cloud/eventarc/publishing/v1/publisher.proto index 25f7e0c055e..0037200cb74 100644 --- a/packages/google-cloud-eventarc-publishing/protos/google/cloud/eventarc/publishing/v1/publisher.proto +++ b/packages/google-cloud-eventarc-publishing/protos/google/cloud/eventarc/publishing/v1/publisher.proto @@ -11,12 +11,16 @@ // WITHOUT 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.eventarc.publishing.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/cloud/eventarc/publishing/v1/cloud_event.proto"; import "google/protobuf/any.proto"; option csharp_namespace = "Google.Cloud.Eventarc.Publishing.V1"; @@ -64,6 +68,7 @@ service Publisher { body: "*" }; } + // Publish events to a subscriber's channel. rpc PublishEvents(PublishEventsRequest) returns (PublishEventsResponse) { option (google.api.http) = { @@ -71,15 +76,26 @@ service Publisher { body: "*" }; } + + // Publish events to a message bus. + rpc Publish(PublishRequest) returns (PublishResponse) { + option (google.api.http) = { + post: "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish" + body: "*" + }; + } } + // The request message for the PublishChannelConnectionEvents method. message PublishChannelConnectionEventsRequest { // The channel_connection that the events are published from. For example: // `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. string channel_connection = 1; + // The CloudEvents v1.0 events to publish. No other types are allowed. // If this field is set, then the `text_events` fields must not be set. repeated google.protobuf.Any events = 2; + // The text representation of events to publish. // CloudEvent v1.0 in JSON format is the only allowed type. Refer to // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md @@ -87,16 +103,20 @@ message PublishChannelConnectionEventsRequest { // If this field is set, then the `events` fields must not be set. repeated string text_events = 3; } + // The response message for the PublishChannelConnectionEvents method. message PublishChannelConnectionEventsResponse {} + // The request message for the PublishEvents method. message PublishEventsRequest { // The full name of the channel to publish to. For example: // `projects/{project}/locations/{location}/channels/{channel-id}`. string channel = 1; + // The CloudEvents v1.0 events to publish. No other types are allowed. // If this field is set, then the `text_events` fields must not be set. repeated google.protobuf.Any events = 2; + // The text representation of events to publish. // CloudEvent v1.0 in JSON format is the only allowed type. Refer to // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md @@ -104,5 +124,33 @@ message PublishEventsRequest { // If this field is set, then the `events` fields must not be set. repeated string text_events = 3; } + // The response message for the PublishEvents method. message PublishEventsResponse {} + +// The request message for the Publish method. +message PublishRequest { + // Required. The full name of the message bus to publish events to. Format: + // `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + string message_bus = 1 [(google.api.field_behavior) = REQUIRED]; + + oneof format { + // The Protobuf format of the CloudEvent being published. Specification can + // be found here: + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + CloudEvent proto_message = 2; + + // The JSON format of the CloudEvent being published. Specification can be + // found here: + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + string json_message = 3; + + // The Avro format of the CloudEvent being published. Specification can + // be found here: + // https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + bytes avro_message = 4; + } +} + +// The response message for the Publish method. +message PublishResponse {} diff --git a/packages/google-cloud-eventarc-publishing/protos/protos.d.ts b/packages/google-cloud-eventarc-publishing/protos/protos.d.ts index 7f7af977f2a..ad816cb89fe 100644 --- a/packages/google-cloud-eventarc-publishing/protos/protos.d.ts +++ b/packages/google-cloud-eventarc-publishing/protos/protos.d.ts @@ -29,6 +29,287 @@ export namespace google { /** Namespace v1. */ namespace v1 { + /** Properties of a CloudEvent. */ + interface ICloudEvent { + + /** CloudEvent id */ + id?: (string|null); + + /** CloudEvent source */ + source?: (string|null); + + /** CloudEvent specVersion */ + specVersion?: (string|null); + + /** CloudEvent type */ + type?: (string|null); + + /** CloudEvent attributes */ + attributes?: ({ [k: string]: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue }|null); + + /** CloudEvent binaryData */ + binaryData?: (Uint8Array|string|null); + + /** CloudEvent textData */ + textData?: (string|null); + + /** CloudEvent protoData */ + protoData?: (google.protobuf.IAny|null); + } + + /** Represents a CloudEvent. */ + class CloudEvent implements ICloudEvent { + + /** + * Constructs a new CloudEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.ICloudEvent); + + /** CloudEvent id. */ + public id: string; + + /** CloudEvent source. */ + public source: string; + + /** CloudEvent specVersion. */ + public specVersion: string; + + /** CloudEvent type. */ + public type: string; + + /** CloudEvent attributes. */ + public attributes: { [k: string]: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue }; + + /** CloudEvent binaryData. */ + public binaryData?: (Uint8Array|string|null); + + /** CloudEvent textData. */ + public textData?: (string|null); + + /** CloudEvent protoData. */ + public protoData?: (google.protobuf.IAny|null); + + /** CloudEvent data. */ + public data?: ("binaryData"|"textData"|"protoData"); + + /** + * Creates a new CloudEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudEvent instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.ICloudEvent): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Encodes the specified CloudEvent message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @param message CloudEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.ICloudEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudEvent message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @param message CloudEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.ICloudEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Decodes a CloudEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Verifies a CloudEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudEvent + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.CloudEvent; + + /** + * Creates a plain object from a CloudEvent message. Also converts values to other types if specified. + * @param message CloudEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.CloudEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudEvent { + + /** Properties of a CloudEventAttributeValue. */ + interface ICloudEventAttributeValue { + + /** CloudEventAttributeValue ceBoolean */ + ceBoolean?: (boolean|null); + + /** CloudEventAttributeValue ceInteger */ + ceInteger?: (number|null); + + /** CloudEventAttributeValue ceString */ + ceString?: (string|null); + + /** CloudEventAttributeValue ceBytes */ + ceBytes?: (Uint8Array|string|null); + + /** CloudEventAttributeValue ceUri */ + ceUri?: (string|null); + + /** CloudEventAttributeValue ceUriRef */ + ceUriRef?: (string|null); + + /** CloudEventAttributeValue ceTimestamp */ + ceTimestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CloudEventAttributeValue. */ + class CloudEventAttributeValue implements ICloudEventAttributeValue { + + /** + * Constructs a new CloudEventAttributeValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue); + + /** CloudEventAttributeValue ceBoolean. */ + public ceBoolean?: (boolean|null); + + /** CloudEventAttributeValue ceInteger. */ + public ceInteger?: (number|null); + + /** CloudEventAttributeValue ceString. */ + public ceString?: (string|null); + + /** CloudEventAttributeValue ceBytes. */ + public ceBytes?: (Uint8Array|string|null); + + /** CloudEventAttributeValue ceUri. */ + public ceUri?: (string|null); + + /** CloudEventAttributeValue ceUriRef. */ + public ceUriRef?: (string|null); + + /** CloudEventAttributeValue ceTimestamp. */ + public ceTimestamp?: (google.protobuf.ITimestamp|null); + + /** CloudEventAttributeValue attr. */ + public attr?: ("ceBoolean"|"ceInteger"|"ceString"|"ceBytes"|"ceUri"|"ceUriRef"|"ceTimestamp"); + + /** + * Creates a new CloudEventAttributeValue instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudEventAttributeValue instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Encodes the specified CloudEventAttributeValue message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @param message CloudEventAttributeValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudEventAttributeValue message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @param message CloudEventAttributeValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Verifies a CloudEventAttributeValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudEventAttributeValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudEventAttributeValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue; + + /** + * Creates a plain object from a CloudEventAttributeValue message. Also converts values to other types if specified. + * @param message CloudEventAttributeValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudEventAttributeValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudEventAttributeValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Represents a Publisher */ class Publisher extends $protobuf.rpc.Service { @@ -76,6 +357,20 @@ export namespace google { * @returns Promise */ public publishEvents(request: google.cloud.eventarc.publishing.v1.IPublishEventsRequest): Promise; + + /** + * Calls Publish. + * @param request PublishRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PublishResponse + */ + public publish(request: google.cloud.eventarc.publishing.v1.IPublishRequest, callback: google.cloud.eventarc.publishing.v1.Publisher.PublishCallback): void; + + /** + * Calls Publish. + * @param request PublishRequest message or plain object + * @returns Promise + */ + public publish(request: google.cloud.eventarc.publishing.v1.IPublishRequest): Promise; } namespace Publisher { @@ -93,6 +388,13 @@ export namespace google { * @param [response] PublishEventsResponse */ type PublishEventsCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishEventsResponse) => void; + + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publish}. + * @param error Error, if any + * @param [response] PublishResponse + */ + type PublishCallback = (error: (Error|null), response?: google.cloud.eventarc.publishing.v1.PublishResponse) => void; } /** Properties of a PublishChannelConnectionEventsRequest. */ @@ -494,6 +796,215 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a PublishRequest. */ + interface IPublishRequest { + + /** PublishRequest messageBus */ + messageBus?: (string|null); + + /** PublishRequest protoMessage */ + protoMessage?: (google.cloud.eventarc.publishing.v1.ICloudEvent|null); + + /** PublishRequest jsonMessage */ + jsonMessage?: (string|null); + + /** PublishRequest avroMessage */ + avroMessage?: (Uint8Array|string|null); + } + + /** Represents a PublishRequest. */ + class PublishRequest implements IPublishRequest { + + /** + * Constructs a new PublishRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishRequest); + + /** PublishRequest messageBus. */ + public messageBus: string; + + /** PublishRequest protoMessage. */ + public protoMessage?: (google.cloud.eventarc.publishing.v1.ICloudEvent|null); + + /** PublishRequest jsonMessage. */ + public jsonMessage?: (string|null); + + /** PublishRequest avroMessage. */ + public avroMessage?: (Uint8Array|string|null); + + /** PublishRequest format. */ + public format?: ("protoMessage"|"jsonMessage"|"avroMessage"); + + /** + * Creates a new PublishRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishRequest instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishRequest): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Encodes the specified PublishRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @param message PublishRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @param message PublishRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Decodes a PublishRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Verifies a PublishRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishRequest; + + /** + * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. + * @param message PublishRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishResponse. */ + interface IPublishResponse { + } + + /** Represents a PublishResponse. */ + class PublishResponse implements IPublishResponse { + + /** + * Constructs a new PublishResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.eventarc.publishing.v1.IPublishResponse); + + /** + * Creates a new PublishResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishResponse instance + */ + public static create(properties?: google.cloud.eventarc.publishing.v1.IPublishResponse): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Encodes the specified PublishResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @param message PublishResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.eventarc.publishing.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @param message PublishResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.eventarc.publishing.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Decodes a PublishResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Verifies a PublishResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.eventarc.publishing.v1.PublishResponse; + + /** + * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. + * @param message PublishResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.eventarc.publishing.v1.PublishResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } @@ -502,6 +1013,19 @@ export namespace google { /** 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 Http. */ interface IHttp { @@ -2348,6 +2872,115 @@ export namespace google { GA = 4, DEPRECATED = 5 } + + /** 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 + } + } } /** Namespace protobuf. */ @@ -4510,6 +5143,12 @@ export namespace google { /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); } /** Represents a FieldOptions. */ @@ -6443,206 +7082,309 @@ export namespace google { } } - /** Properties of a Duration. */ - interface IDuration { + /** Properties of an Any. */ + interface IAny { - /** Duration seconds */ + /** 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 Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ seconds?: (number|Long|string|null); - /** Duration nanos */ + /** Timestamp nanos */ nanos?: (number|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new Duration. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.protobuf.ITimestamp); - /** Duration seconds. */ + /** Timestamp seconds. */ public seconds: (number|Long|string); - /** Duration nanos. */ + /** Timestamp nanos. */ public nanos: number; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Duration + * @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.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @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.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a Duration message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Duration + * 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 { + /** Properties of a Duration. */ + interface IDuration { - /** Any type_url */ - type_url?: (string|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** Any value */ - value?: (Uint8Array|string|null); + /** Duration nanos */ + nanos?: (number|null); } - /** Represents an Any. */ - class Any implements IAny { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Any. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IAny); + constructor(properties?: google.protobuf.IDuration); - /** Any type_url. */ - public type_url: string; + /** Duration seconds. */ + public seconds: (number|Long|string); - /** Any value. */ - public value: (Uint8Array|string); + /** Duration nanos. */ + public nanos: number; /** - * Creates a new Any instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * Encodes the specified 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Any + * @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.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @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.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies an Any message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * Creates a plain object from a 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Any + * Gets the default type url for Duration * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-eventarc-publishing/protos/protos.js b/packages/google-cloud-eventarc-publishing/protos/protos.js index 5e038a14316..716620e29b9 100644 --- a/packages/google-cloud-eventarc-publishing/protos/protos.js +++ b/packages/google-cloud-eventarc-publishing/protos/protos.js @@ -75,6 +75,858 @@ */ var v1 = {}; + v1.CloudEvent = (function() { + + /** + * Properties of a CloudEvent. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface ICloudEvent + * @property {string|null} [id] CloudEvent id + * @property {string|null} [source] CloudEvent source + * @property {string|null} [specVersion] CloudEvent specVersion + * @property {string|null} [type] CloudEvent type + * @property {Object.|null} [attributes] CloudEvent attributes + * @property {Uint8Array|null} [binaryData] CloudEvent binaryData + * @property {string|null} [textData] CloudEvent textData + * @property {google.protobuf.IAny|null} [protoData] CloudEvent protoData + */ + + /** + * Constructs a new CloudEvent. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a CloudEvent. + * @implements ICloudEvent + * @constructor + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent=} [properties] Properties to set + */ + function CloudEvent(properties) { + this.attributes = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudEvent id. + * @member {string} id + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.id = ""; + + /** + * CloudEvent source. + * @member {string} source + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.source = ""; + + /** + * CloudEvent specVersion. + * @member {string} specVersion + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.specVersion = ""; + + /** + * CloudEvent type. + * @member {string} type + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.type = ""; + + /** + * CloudEvent attributes. + * @member {Object.} attributes + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.attributes = $util.emptyObject; + + /** + * CloudEvent binaryData. + * @member {Uint8Array|null|undefined} binaryData + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.binaryData = null; + + /** + * CloudEvent textData. + * @member {string|null|undefined} textData + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.textData = null; + + /** + * CloudEvent protoData. + * @member {google.protobuf.IAny|null|undefined} protoData + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + CloudEvent.prototype.protoData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudEvent data. + * @member {"binaryData"|"textData"|"protoData"|undefined} data + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + */ + Object.defineProperty(CloudEvent.prototype, "data", { + get: $util.oneOfGetter($oneOfFields = ["binaryData", "textData", "protoData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudEvent instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent instance + */ + CloudEvent.create = function create(properties) { + return new CloudEvent(properties); + }; + + /** + * Encodes the specified CloudEvent message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent} message CloudEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.source); + if (message.specVersion != null && Object.hasOwnProperty.call(message, "specVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.specVersion); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) + for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.encode(message.attributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.binaryData != null && Object.hasOwnProperty.call(message, "binaryData")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.binaryData); + if (message.textData != null && Object.hasOwnProperty.call(message, "textData")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.textData); + if (message.protoData != null && Object.hasOwnProperty.call(message, "protoData")) + $root.google.protobuf.Any.encode(message.protoData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudEvent message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.ICloudEvent} message CloudEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudEvent message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.source = reader.string(); + break; + } + case 3: { + message.specVersion = reader.string(); + break; + } + case 4: { + message.type = reader.string(); + break; + } + case 5: { + if (message.attributes === $util.emptyObject) + message.attributes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.attributes[key] = value; + break; + } + case 6: { + message.binaryData = reader.bytes(); + break; + } + case 7: { + message.textData = reader.string(); + break; + } + case 8: { + message.protoData = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudEvent message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.source != null && message.hasOwnProperty("source")) + if (!$util.isString(message.source)) + return "source: string expected"; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + if (!$util.isString(message.specVersion)) + return "specVersion: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!$util.isObject(message.attributes)) + return "attributes: object expected"; + var key = Object.keys(message.attributes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify(message.attributes[key[i]]); + if (error) + return "attributes." + error; + } + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) { + properties.data = 1; + if (!(message.binaryData && typeof message.binaryData.length === "number" || $util.isString(message.binaryData))) + return "binaryData: buffer expected"; + } + if (message.textData != null && message.hasOwnProperty("textData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + if (!$util.isString(message.textData)) + return "textData: string expected"; + } + if (message.protoData != null && message.hasOwnProperty("protoData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.protobuf.Any.verify(message.protoData); + if (error) + return "protoData." + error; + } + } + return null; + }; + + /** + * Creates a CloudEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent} CloudEvent + */ + CloudEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.CloudEvent) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent(); + if (object.id != null) + message.id = String(object.id); + if (object.source != null) + message.source = String(object.source); + if (object.specVersion != null) + message.specVersion = String(object.specVersion); + if (object.type != null) + message.type = String(object.type); + if (object.attributes) { + if (typeof object.attributes !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.attributes: object expected"); + message.attributes = {}; + for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { + if (typeof object.attributes[keys[i]] !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.attributes: object expected"); + message.attributes[keys[i]] = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.fromObject(object.attributes[keys[i]]); + } + } + if (object.binaryData != null) + if (typeof object.binaryData === "string") + $util.base64.decode(object.binaryData, message.binaryData = $util.newBuffer($util.base64.length(object.binaryData)), 0); + else if (object.binaryData.length >= 0) + message.binaryData = object.binaryData; + if (object.textData != null) + message.textData = String(object.textData); + if (object.protoData != null) { + if (typeof object.protoData !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.protoData: object expected"); + message.protoData = $root.google.protobuf.Any.fromObject(object.protoData); + } + return message; + }; + + /** + * Creates a plain object from a CloudEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent} message CloudEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.attributes = {}; + if (options.defaults) { + object.id = ""; + object.source = ""; + object.specVersion = ""; + object.type = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.source != null && message.hasOwnProperty("source")) + object.source = message.source; + if (message.specVersion != null && message.hasOwnProperty("specVersion")) + object.specVersion = message.specVersion; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + var keys2; + if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { + object.attributes = {}; + for (var j = 0; j < keys2.length; ++j) + object.attributes[keys2[j]] = $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.toObject(message.attributes[keys2[j]], options); + } + if (message.binaryData != null && message.hasOwnProperty("binaryData")) { + object.binaryData = options.bytes === String ? $util.base64.encode(message.binaryData, 0, message.binaryData.length) : options.bytes === Array ? Array.prototype.slice.call(message.binaryData) : message.binaryData; + if (options.oneofs) + object.data = "binaryData"; + } + if (message.textData != null && message.hasOwnProperty("textData")) { + object.textData = message.textData; + if (options.oneofs) + object.data = "textData"; + } + if (message.protoData != null && message.hasOwnProperty("protoData")) { + object.protoData = $root.google.protobuf.Any.toObject(message.protoData, options); + if (options.oneofs) + object.data = "protoData"; + } + return object; + }; + + /** + * Converts this CloudEvent to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @instance + * @returns {Object.} JSON object + */ + CloudEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudEvent + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.CloudEvent"; + }; + + CloudEvent.CloudEventAttributeValue = (function() { + + /** + * Properties of a CloudEventAttributeValue. + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @interface ICloudEventAttributeValue + * @property {boolean|null} [ceBoolean] CloudEventAttributeValue ceBoolean + * @property {number|null} [ceInteger] CloudEventAttributeValue ceInteger + * @property {string|null} [ceString] CloudEventAttributeValue ceString + * @property {Uint8Array|null} [ceBytes] CloudEventAttributeValue ceBytes + * @property {string|null} [ceUri] CloudEventAttributeValue ceUri + * @property {string|null} [ceUriRef] CloudEventAttributeValue ceUriRef + * @property {google.protobuf.ITimestamp|null} [ceTimestamp] CloudEventAttributeValue ceTimestamp + */ + + /** + * Constructs a new CloudEventAttributeValue. + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent + * @classdesc Represents a CloudEventAttributeValue. + * @implements ICloudEventAttributeValue + * @constructor + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue=} [properties] Properties to set + */ + function CloudEventAttributeValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudEventAttributeValue ceBoolean. + * @member {boolean|null|undefined} ceBoolean + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceBoolean = null; + + /** + * CloudEventAttributeValue ceInteger. + * @member {number|null|undefined} ceInteger + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceInteger = null; + + /** + * CloudEventAttributeValue ceString. + * @member {string|null|undefined} ceString + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceString = null; + + /** + * CloudEventAttributeValue ceBytes. + * @member {Uint8Array|null|undefined} ceBytes + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceBytes = null; + + /** + * CloudEventAttributeValue ceUri. + * @member {string|null|undefined} ceUri + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceUri = null; + + /** + * CloudEventAttributeValue ceUriRef. + * @member {string|null|undefined} ceUriRef + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceUriRef = null; + + /** + * CloudEventAttributeValue ceTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} ceTimestamp + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + CloudEventAttributeValue.prototype.ceTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudEventAttributeValue attr. + * @member {"ceBoolean"|"ceInteger"|"ceString"|"ceBytes"|"ceUri"|"ceUriRef"|"ceTimestamp"|undefined} attr + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + */ + Object.defineProperty(CloudEventAttributeValue.prototype, "attr", { + get: $util.oneOfGetter($oneOfFields = ["ceBoolean", "ceInteger", "ceString", "ceBytes", "ceUri", "ceUriRef", "ceTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudEventAttributeValue instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue instance + */ + CloudEventAttributeValue.create = function create(properties) { + return new CloudEventAttributeValue(properties); + }; + + /** + * Encodes the specified CloudEventAttributeValue message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue} message CloudEventAttributeValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEventAttributeValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ceBoolean != null && Object.hasOwnProperty.call(message, "ceBoolean")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.ceBoolean); + if (message.ceInteger != null && Object.hasOwnProperty.call(message, "ceInteger")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ceInteger); + if (message.ceString != null && Object.hasOwnProperty.call(message, "ceString")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ceString); + if (message.ceBytes != null && Object.hasOwnProperty.call(message, "ceBytes")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.ceBytes); + if (message.ceUri != null && Object.hasOwnProperty.call(message, "ceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.ceUri); + if (message.ceUriRef != null && Object.hasOwnProperty.call(message, "ceUriRef")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.ceUriRef); + if (message.ceTimestamp != null && Object.hasOwnProperty.call(message, "ceTimestamp")) + $root.google.protobuf.Timestamp.encode(message.ceTimestamp, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudEventAttributeValue message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.ICloudEventAttributeValue} message CloudEventAttributeValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudEventAttributeValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEventAttributeValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ceBoolean = reader.bool(); + break; + } + case 2: { + message.ceInteger = reader.int32(); + break; + } + case 3: { + message.ceString = reader.string(); + break; + } + case 4: { + message.ceBytes = reader.bytes(); + break; + } + case 5: { + message.ceUri = reader.string(); + break; + } + case 6: { + message.ceUriRef = reader.string(); + break; + } + case 7: { + message.ceTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudEventAttributeValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudEventAttributeValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudEventAttributeValue message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudEventAttributeValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ceBoolean != null && message.hasOwnProperty("ceBoolean")) { + properties.attr = 1; + if (typeof message.ceBoolean !== "boolean") + return "ceBoolean: boolean expected"; + } + if (message.ceInteger != null && message.hasOwnProperty("ceInteger")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isInteger(message.ceInteger)) + return "ceInteger: integer expected"; + } + if (message.ceString != null && message.hasOwnProperty("ceString")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isString(message.ceString)) + return "ceString: string expected"; + } + if (message.ceBytes != null && message.hasOwnProperty("ceBytes")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!(message.ceBytes && typeof message.ceBytes.length === "number" || $util.isString(message.ceBytes))) + return "ceBytes: buffer expected"; + } + if (message.ceUri != null && message.hasOwnProperty("ceUri")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isString(message.ceUri)) + return "ceUri: string expected"; + } + if (message.ceUriRef != null && message.hasOwnProperty("ceUriRef")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + if (!$util.isString(message.ceUriRef)) + return "ceUriRef: string expected"; + } + if (message.ceTimestamp != null && message.hasOwnProperty("ceTimestamp")) { + if (properties.attr === 1) + return "attr: multiple values"; + properties.attr = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.ceTimestamp); + if (error) + return "ceTimestamp." + error; + } + } + return null; + }; + + /** + * Creates a CloudEventAttributeValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} CloudEventAttributeValue + */ + CloudEventAttributeValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue(); + if (object.ceBoolean != null) + message.ceBoolean = Boolean(object.ceBoolean); + if (object.ceInteger != null) + message.ceInteger = object.ceInteger | 0; + if (object.ceString != null) + message.ceString = String(object.ceString); + if (object.ceBytes != null) + if (typeof object.ceBytes === "string") + $util.base64.decode(object.ceBytes, message.ceBytes = $util.newBuffer($util.base64.length(object.ceBytes)), 0); + else if (object.ceBytes.length >= 0) + message.ceBytes = object.ceBytes; + if (object.ceUri != null) + message.ceUri = String(object.ceUri); + if (object.ceUriRef != null) + message.ceUriRef = String(object.ceUriRef); + if (object.ceTimestamp != null) { + if (typeof object.ceTimestamp !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue.ceTimestamp: object expected"); + message.ceTimestamp = $root.google.protobuf.Timestamp.fromObject(object.ceTimestamp); + } + return message; + }; + + /** + * Creates a plain object from a CloudEventAttributeValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue} message CloudEventAttributeValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudEventAttributeValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ceBoolean != null && message.hasOwnProperty("ceBoolean")) { + object.ceBoolean = message.ceBoolean; + if (options.oneofs) + object.attr = "ceBoolean"; + } + if (message.ceInteger != null && message.hasOwnProperty("ceInteger")) { + object.ceInteger = message.ceInteger; + if (options.oneofs) + object.attr = "ceInteger"; + } + if (message.ceString != null && message.hasOwnProperty("ceString")) { + object.ceString = message.ceString; + if (options.oneofs) + object.attr = "ceString"; + } + if (message.ceBytes != null && message.hasOwnProperty("ceBytes")) { + object.ceBytes = options.bytes === String ? $util.base64.encode(message.ceBytes, 0, message.ceBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.ceBytes) : message.ceBytes; + if (options.oneofs) + object.attr = "ceBytes"; + } + if (message.ceUri != null && message.hasOwnProperty("ceUri")) { + object.ceUri = message.ceUri; + if (options.oneofs) + object.attr = "ceUri"; + } + if (message.ceUriRef != null && message.hasOwnProperty("ceUriRef")) { + object.ceUriRef = message.ceUriRef; + if (options.oneofs) + object.attr = "ceUriRef"; + } + if (message.ceTimestamp != null && message.hasOwnProperty("ceTimestamp")) { + object.ceTimestamp = $root.google.protobuf.Timestamp.toObject(message.ceTimestamp, options); + if (options.oneofs) + object.attr = "ceTimestamp"; + } + return object; + }; + + /** + * Converts this CloudEventAttributeValue to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @instance + * @returns {Object.} JSON object + */ + CloudEventAttributeValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudEventAttributeValue + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudEventAttributeValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue"; + }; + + return CloudEventAttributeValue; + })(); + + return CloudEvent; + })(); + v1.Publisher = (function() { /** @@ -173,6 +1025,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.eventarc.publishing.v1.Publisher|publish}. + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @typedef PublishCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.eventarc.publishing.v1.PublishResponse} [response] PublishResponse + */ + + /** + * Calls Publish. + * @function publish + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} request PublishRequest message or plain object + * @param {google.cloud.eventarc.publishing.v1.Publisher.PublishCallback} callback Node-style callback called with the error, if any, and PublishResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Publisher.prototype.publish = function publish(request, callback) { + return this.rpcCall(publish, $root.google.cloud.eventarc.publishing.v1.PublishRequest, $root.google.cloud.eventarc.publishing.v1.PublishResponse, request, callback); + }, "name", { value: "Publish" }); + + /** + * Calls Publish. + * @function publish + * @memberof google.cloud.eventarc.publishing.v1.Publisher + * @instance + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} request PublishRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Publisher; })(); @@ -1102,17 +1987,504 @@ return PublishEventsResponse; })(); - return v1; - })(); - - return publishing; - })(); + v1.PublishRequest = (function() { - return eventarc; - })(); + /** + * Properties of a PublishRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishRequest + * @property {string|null} [messageBus] PublishRequest messageBus + * @property {google.cloud.eventarc.publishing.v1.ICloudEvent|null} [protoMessage] PublishRequest protoMessage + * @property {string|null} [jsonMessage] PublishRequest jsonMessage + * @property {Uint8Array|null} [avroMessage] PublishRequest avroMessage + */ - return cloud; - })(); + /** + * Constructs a new PublishRequest. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishRequest. + * @implements IPublishRequest + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest=} [properties] Properties to set + */ + function PublishRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublishRequest messageBus. + * @member {string} messageBus + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.messageBus = ""; + + /** + * PublishRequest protoMessage. + * @member {google.cloud.eventarc.publishing.v1.ICloudEvent|null|undefined} protoMessage + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.protoMessage = null; + + /** + * PublishRequest jsonMessage. + * @member {string|null|undefined} jsonMessage + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.jsonMessage = null; + + /** + * PublishRequest avroMessage. + * @member {Uint8Array|null|undefined} avroMessage + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + PublishRequest.prototype.avroMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PublishRequest format. + * @member {"protoMessage"|"jsonMessage"|"avroMessage"|undefined} format + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + */ + Object.defineProperty(PublishRequest.prototype, "format", { + get: $util.oneOfGetter($oneOfFields = ["protoMessage", "jsonMessage", "avroMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PublishRequest instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest instance + */ + PublishRequest.create = function create(properties) { + return new PublishRequest(properties); + }; + + /** + * Encodes the specified PublishRequest message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} message PublishRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageBus != null && Object.hasOwnProperty.call(message, "messageBus")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageBus); + if (message.protoMessage != null && Object.hasOwnProperty.call(message, "protoMessage")) + $root.google.cloud.eventarc.publishing.v1.CloudEvent.encode(message.protoMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jsonMessage != null && Object.hasOwnProperty.call(message, "jsonMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.jsonMessage); + if (message.avroMessage != null && Object.hasOwnProperty.call(message, "avroMessage")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.avroMessage); + return writer; + }; + + /** + * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishRequest} message PublishRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageBus = reader.string(); + break; + } + case 2: { + message.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.decode(reader, reader.uint32()); + break; + } + case 3: { + message.jsonMessage = reader.string(); + break; + } + case 4: { + message.avroMessage = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishRequest message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + if (!$util.isString(message.messageBus)) + return "messageBus: string expected"; + if (message.protoMessage != null && message.hasOwnProperty("protoMessage")) { + properties.format = 1; + { + var error = $root.google.cloud.eventarc.publishing.v1.CloudEvent.verify(message.protoMessage); + if (error) + return "protoMessage." + error; + } + } + if (message.jsonMessage != null && message.hasOwnProperty("jsonMessage")) { + if (properties.format === 1) + return "format: multiple values"; + properties.format = 1; + if (!$util.isString(message.jsonMessage)) + return "jsonMessage: string expected"; + } + if (message.avroMessage != null && message.hasOwnProperty("avroMessage")) { + if (properties.format === 1) + return "format: multiple values"; + properties.format = 1; + if (!(message.avroMessage && typeof message.avroMessage.length === "number" || $util.isString(message.avroMessage))) + return "avroMessage: buffer expected"; + } + return null; + }; + + /** + * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishRequest} PublishRequest + */ + PublishRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishRequest) + return object; + var message = new $root.google.cloud.eventarc.publishing.v1.PublishRequest(); + if (object.messageBus != null) + message.messageBus = String(object.messageBus); + if (object.protoMessage != null) { + if (typeof object.protoMessage !== "object") + throw TypeError(".google.cloud.eventarc.publishing.v1.PublishRequest.protoMessage: object expected"); + message.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.fromObject(object.protoMessage); + } + if (object.jsonMessage != null) + message.jsonMessage = String(object.jsonMessage); + if (object.avroMessage != null) + if (typeof object.avroMessage === "string") + $util.base64.decode(object.avroMessage, message.avroMessage = $util.newBuffer($util.base64.length(object.avroMessage)), 0); + else if (object.avroMessage.length >= 0) + message.avroMessage = object.avroMessage; + return message; + }; + + /** + * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishRequest} message PublishRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.messageBus = ""; + if (message.messageBus != null && message.hasOwnProperty("messageBus")) + object.messageBus = message.messageBus; + if (message.protoMessage != null && message.hasOwnProperty("protoMessage")) { + object.protoMessage = $root.google.cloud.eventarc.publishing.v1.CloudEvent.toObject(message.protoMessage, options); + if (options.oneofs) + object.format = "protoMessage"; + } + if (message.jsonMessage != null && message.hasOwnProperty("jsonMessage")) { + object.jsonMessage = message.jsonMessage; + if (options.oneofs) + object.format = "jsonMessage"; + } + if (message.avroMessage != null && message.hasOwnProperty("avroMessage")) { + object.avroMessage = options.bytes === String ? $util.base64.encode(message.avroMessage, 0, message.avroMessage.length) : options.bytes === Array ? Array.prototype.slice.call(message.avroMessage) : message.avroMessage; + if (options.oneofs) + object.format = "avroMessage"; + } + return object; + }; + + /** + * Converts this PublishRequest to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @instance + * @returns {Object.} JSON object + */ + PublishRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishRequest + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishRequest"; + }; + + return PublishRequest; + })(); + + v1.PublishResponse = (function() { + + /** + * Properties of a PublishResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @interface IPublishResponse + */ + + /** + * Constructs a new PublishResponse. + * @memberof google.cloud.eventarc.publishing.v1 + * @classdesc Represents a PublishResponse. + * @implements IPublishResponse + * @constructor + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse=} [properties] Properties to set + */ + function PublishResponse(properties) { + if (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 PublishResponse instance using the specified properties. + * @function create + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse=} [properties] Properties to set + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse instance + */ + PublishResponse.create = function create(properties) { + return new PublishResponse(properties); + }; + + /** + * Encodes the specified PublishResponse message. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse} message PublishResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.cloud.eventarc.publishing.v1.PublishResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.IPublishResponse} message PublishResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.eventarc.publishing.v1.PublishResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishResponse message. + * @function verify + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.eventarc.publishing.v1.PublishResponse} PublishResponse + */ + PublishResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.eventarc.publishing.v1.PublishResponse) + return object; + return new $root.google.cloud.eventarc.publishing.v1.PublishResponse(); + }; + + /** + * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {google.cloud.eventarc.publishing.v1.PublishResponse} message PublishResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishResponse to JSON. + * @function toJSON + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @instance + * @returns {Object.} JSON object + */ + PublishResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishResponse + * @function getTypeUrl + * @memberof google.cloud.eventarc.publishing.v1.PublishResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.eventarc.publishing.v1.PublishResponse"; + }; + + return PublishResponse; + })(); + + return v1; + })(); + + return publishing; + })(); + + return eventarc; + })(); + + return cloud; + })(); google.api = (function() { @@ -1123,6 +2495,34 @@ */ 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.Http = (function() { /** @@ -6015,6 +7415,263 @@ return values; })(); + api.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + return api; })(); @@ -12114,6 +13771,8 @@ * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo */ /** @@ -12128,6 +13787,7 @@ 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) @@ -12238,6 +13898,22 @@ */ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + /** * Creates a new FieldOptions instance using the specified properties. * @function create @@ -12291,6 +13967,14 @@ if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.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; }; @@ -12388,6 +14072,21 @@ message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12511,6 +14210,30 @@ return "uninterpretedOption." + error; } } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } return null; }; @@ -12666,15 +14389,69 @@ 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.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); } return message; }; @@ -12696,6 +14473,7 @@ object.targets = []; object.editionDefaults = []; object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; } if (options.defaults) { object.ctype = options.enums === String ? "STRING" : 0; @@ -12708,6 +14486,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = 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; @@ -12744,6 +14523,13 @@ 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.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; @@ -17810,28 +19596,264 @@ return Annotation; })(); - return GeneratedCodeInfo; + return GeneratedCodeInfo; + })(); + + 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() { + protobuf.Timestamp = (function() { /** - * Properties of a Duration. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new Duration. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function Duration(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17839,43 +19861,43 @@ } /** - * Duration seconds. + * Timestamp seconds. * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Duration nanos. + * Timestamp nanos. * @member {number} nanos - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @instance */ - Duration.prototype.nanos = 0; + Timestamp.prototype.nanos = 0; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) @@ -17886,33 +19908,33 @@ }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @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.Duration} Duration + * @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 */ - Duration.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + 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) { @@ -17933,30 +19955,30 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @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 */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.Duration + * @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 */ - Duration.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.seconds != null && message.hasOwnProperty("seconds")) @@ -17969,17 +19991,17 @@ }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Timestamp} Timestamp */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.Duration(); + var message = new $root.google.protobuf.Timestamp(); if (object.seconds != null) if ($util.Long) (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; @@ -17995,15 +20017,15 @@ }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -18026,53 +20048,53 @@ }; /** - * Converts this Duration to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; - return Duration; + return Timestamp; })(); - protobuf.Any = (function() { + protobuf.Duration = (function() { /** - * Properties of an Any. + * Properties of a Duration. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new Any. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function Any(properties) { + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18080,89 +20102,89 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - Any.prototype.type_url = ""; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - Any.prototype.value = $util.newBuffer([]); + Duration.prototype.nanos = 0; /** - * Creates a new Any instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - Any.create = function create(properties) { - return new Any(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.Any} Any + * @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 */ - Any.decode = function decode(reader, length) { + Duration.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + 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.type_url = reader.string(); + message.seconds = reader.int64(); break; } case 2: { - message.value = reader.bytes(); + message.nanos = reader.int32(); break; } default: @@ -18174,120 +20196,125 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; + if (message.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 an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.Duration} Duration */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; + var message = new $root.google.protobuf.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 an Any message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Duration.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 ($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.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; + 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 Any to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Any + * Gets the default type url for Duration * @function getTypeUrl - * @memberof google.protobuf.Any + * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Any"; + return typeUrlPrefix + "/google.protobuf.Duration"; }; - return Any; + return Duration; })(); return protobuf; diff --git a/packages/google-cloud-eventarc-publishing/protos/protos.json b/packages/google-cloud-eventarc-publishing/protos/protos.json index e04ca44956e..ff02b2b7bd8 100644 --- a/packages/google-cloud-eventarc-publishing/protos/protos.json +++ b/packages/google-cloud-eventarc-publishing/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -19,6 +22,123 @@ "ruby_package": "Google::Cloud::Eventarc::Publishing::V1" }, "nested": { + "CloudEvent": { + "oneofs": { + "data": { + "oneof": [ + "binaryData", + "textData", + "protoData" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "source": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "specVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "type": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "attributes": { + "keyType": "string", + "type": "CloudEventAttributeValue", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "binaryData": { + "type": "bytes", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "textData": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "protoData": { + "type": "google.protobuf.Any", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CloudEventAttributeValue": { + "oneofs": { + "attr": { + "oneof": [ + "ceBoolean", + "ceInteger", + "ceString", + "ceBytes", + "ceUri", + "ceUriRef", + "ceTimestamp" + ] + } + }, + "fields": { + "ceBoolean": { + "type": "bool", + "id": 1 + }, + "ceInteger": { + "type": "int32", + "id": 2 + }, + "ceString": { + "type": "string", + "id": 3 + }, + "ceBytes": { + "type": "bytes", + "id": 4 + }, + "ceUri": { + "type": "string", + "id": 5 + }, + "ceUriRef": { + "type": "string", + "id": 6 + }, + "ceTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 7 + } + } + } + } + }, "Publisher": { "options": { "(google.api.default_host)": "eventarcpublishing.googleapis.com", @@ -56,6 +176,22 @@ } } ] + }, + "Publish": { + "requestType": "PublishRequest", + "responseType": "PublishResponse", + "options": { + "(google.api.http).post": "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish", + "body": "*" + } + } + ] } } }, @@ -100,6 +236,41 @@ }, "PublishEventsResponse": { "fields": {} + }, + "PublishRequest": { + "oneofs": { + "format": { + "oneof": [ + "protoMessage", + "jsonMessage", + "avroMessage" + ] + } + }, + "fields": { + "messageBus": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protoMessage": { + "type": "CloudEvent", + "id": 2 + }, + "jsonMessage": { + "type": "string", + "id": 3 + }, + "avroMessage": { + "type": "bytes", + "id": 4 + } + } + }, + "PublishResponse": { + "fields": {} } } } @@ -111,14 +282,33 @@ }, "api": { "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", + "java_outer_classname": "FieldInfoProto", "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" + }, + "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 + } + }, "http": { "type": "HttpRule", "id": 72295728, @@ -500,6 +690,30 @@ "GA": 4, "DEPRECATED": 5 } + }, + "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 + } + } + } } } }, @@ -1778,7 +1992,19 @@ } } }, - "Duration": { + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Timestamp": { "fields": { "seconds": { "type": "int64", @@ -1790,14 +2016,14 @@ } } }, - "Any": { + "Duration": { "fields": { - "type_url": { - "type": "string", + "seconds": { + "type": "int64", "id": 1 }, - "value": { - "type": "bytes", + "nanos": { + "type": "int32", "id": 2 } } diff --git a/packages/google-cloud-eventarc-publishing/samples/README.md b/packages/google-cloud-eventarc-publishing/samples/README.md index b57f36df85f..94ae3c13f68 100644 --- a/packages/google-cloud-eventarc-publishing/samples/README.md +++ b/packages/google-cloud-eventarc-publishing/samples/README.md @@ -12,6 +12,7 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Publisher.publish](#publisher.publish) * [Publisher.publish_channel_connection_events](#publisher.publish_channel_connection_events) * [Publisher.publish_events](#publisher.publish_events) * [Quickstart](#quickstart) @@ -31,6 +32,23 @@ Before running the samples, make sure you've followed the steps outlined in +### Publisher.publish + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js` + + +----- + + + + ### Publisher.publish_channel_connection_events View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish_channel_connection_events.js). diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish.js b/packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js similarity index 100% rename from owl-bot-staging/google-cloud-eventarc-publishing/v1/samples/generated/v1/publisher.publish.js rename to packages/google-cloud-eventarc-publishing/samples/generated/v1/publisher.publish.js diff --git a/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json index 7a61118dbff..547b27ce214 100644 --- a/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json +++ b/packages/google-cloud-eventarc-publishing/samples/generated/v1/snippet_metadata_google.cloud.eventarc.publishing.v1.json @@ -106,6 +106,58 @@ } } } + }, + { + "regionTag": "eventarcpublishing_v1_generated_Publisher_Publish_async", + "title": "Publisher publish Sample", + "origin": "API_DEFINITION", + "description": " Publish events to a message bus.", + "canonical": true, + "file": "publisher.publish.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "Publish", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.Publish", + "async": true, + "parameters": [ + { + "name": "message_bus", + "type": "TYPE_STRING" + }, + { + "name": "proto_message", + "type": ".google.cloud.eventarc.publishing.v1.CloudEvent" + }, + { + "name": "json_message", + "type": "TYPE_STRING" + }, + { + "name": "avro_message", + "type": "TYPE_BYTES" + } + ], + "resultType": ".google.cloud.eventarc.publishing.v1.PublishResponse", + "client": { + "shortName": "PublisherClient", + "fullName": "google.cloud.eventarc.publishing.v1.PublisherClient" + }, + "method": { + "shortName": "Publish", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher.Publish", + "service": { + "shortName": "Publisher", + "fullName": "google.cloud.eventarc.publishing.v1.Publisher" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-eventarc-publishing/src/v1/gapic_metadata.json b/packages/google-cloud-eventarc-publishing/src/v1/gapic_metadata.json index 159d743f3b8..ec79a2d0cd8 100644 --- a/packages/google-cloud-eventarc-publishing/src/v1/gapic_metadata.json +++ b/packages/google-cloud-eventarc-publishing/src/v1/gapic_metadata.json @@ -19,6 +19,11 @@ "methods": [ "publishEvents" ] + }, + "Publish": { + "methods": [ + "publish" + ] } } }, @@ -34,6 +39,11 @@ "methods": [ "publishEvents" ] + }, + "Publish": { + "methods": [ + "publish" + ] } } } diff --git a/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts b/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts index aafd7a6d0a0..fc2226e1381 100644 --- a/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts +++ b/packages/google-cloud-eventarc-publishing/src/v1/publisher_client.ts @@ -267,6 +267,7 @@ export class PublisherClient { const publisherStubMethods = [ 'publishChannelConnectionEvents', 'publishEvents', + 'publish', ]; for (const methodName of publisherStubMethods) { const callPromise = this.publisherStub.then( @@ -597,6 +598,109 @@ export class PublisherClient { this.initialize(); return this.innerApiCalls.publishEvents(request, options, callback); } + /** + * Publish events to a message bus. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.messageBus + * Required. The full name of the message bus to publish events to. Format: + * `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + * @param {google.cloud.eventarc.publishing.v1.CloudEvent} request.protoMessage + * The Protobuf format of the CloudEvent being published. Specification can + * be found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + * @param {string} request.jsonMessage + * The JSON format of the CloudEvent being published. Specification can be + * found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + * @param {Buffer} request.avroMessage + * The Avro format of the CloudEvent being published. Specification can + * be found here: + * https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.eventarc.publishing.v1.PublishResponse|PublishResponse}. + * 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/publisher.publish.js + * region_tag:eventarcpublishing_v1_generated_Publisher_Publish_async + */ + publish( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest | undefined, + {} | undefined, + ] + >; + publish( + request: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + | protos.google.cloud.eventarc.publishing.v1.IPublishRequest + | null + | undefined, + {} | null | undefined + > + ): void; + publish( + request: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + callback: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + | protos.google.cloud.eventarc.publishing.v1.IPublishRequest + | null + | undefined, + {} | null | undefined + > + ): void; + publish( + request?: protos.google.cloud.eventarc.publishing.v1.IPublishRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + | protos.google.cloud.eventarc.publishing.v1.IPublishRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + | protos.google.cloud.eventarc.publishing.v1.IPublishRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.eventarc.publishing.v1.IPublishResponse, + protos.google.cloud.eventarc.publishing.v1.IPublishRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + message_bus: request.messageBus ?? '', + }); + this.initialize(); + return this.innerApiCalls.publish(request, options, callback); + } /** * Terminate the gRPC channel and close the client. diff --git a/packages/google-cloud-eventarc-publishing/src/v1/publisher_client_config.json b/packages/google-cloud-eventarc-publishing/src/v1/publisher_client_config.json index 55c6b093fce..d364c8bb2b7 100644 --- a/packages/google-cloud-eventarc-publishing/src/v1/publisher_client_config.json +++ b/packages/google-cloud-eventarc-publishing/src/v1/publisher_client_config.json @@ -28,6 +28,11 @@ "PublishEvents": { "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "Publish": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-eventarc-publishing/src/v1/publisher_proto_list.json b/packages/google-cloud-eventarc-publishing/src/v1/publisher_proto_list.json index d2912b54f3e..d651cd130b2 100644 --- a/packages/google-cloud-eventarc-publishing/src/v1/publisher_proto_list.json +++ b/packages/google-cloud-eventarc-publishing/src/v1/publisher_proto_list.json @@ -1,3 +1,4 @@ [ + "../../protos/google/cloud/eventarc/publishing/v1/cloud_event.proto", "../../protos/google/cloud/eventarc/publishing/v1/publisher.proto" ] diff --git a/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts b/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts index 525e32c3db9..afe4367b455 100644 --- a/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts +++ b/packages/google-cloud-eventarc-publishing/test/gapic_publisher_v1.ts @@ -509,4 +509,131 @@ describe('v1.PublisherClient', () => { await assert.rejects(client.publishEvents(request), expectedError); }); }); + + describe('publish', () => { + it('invokes publish without error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.publishing.v1.PublishRequest', + ['messageBus'] + ); + request.messageBus = defaultValue1; + const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishResponse() + ); + client.innerApiCalls.publish = stubSimpleCall(expectedResponse); + const [response] = await client.publish(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publish as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.publish as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publish without error using callback', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.publishing.v1.PublishRequest', + ['messageBus'] + ); + request.messageBus = defaultValue1; + const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishResponse() + ); + client.innerApiCalls.publish = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.publish( + request, + ( + err?: Error | null, + result?: protos.google.cloud.eventarc.publishing.v1.IPublishResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.publish as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.publish as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publish with error', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.publishing.v1.PublishRequest', + ['messageBus'] + ); + request.messageBus = defaultValue1; + const expectedHeaderRequestParams = `message_bus=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.publish = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.publish(request), expectedError); + const actualRequest = (client.innerApiCalls.publish as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.publish as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes publish with closed client', async () => { + const client = new publisherModule.v1.PublisherClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.eventarc.publishing.v1.PublishRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.eventarc.publishing.v1.PublishRequest', + ['messageBus'] + ); + request.messageBus = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.publish(request), expectedError); + }); + }); }); diff --git a/packages/google-cloud-securitycentermanagement/README.md b/packages/google-cloud-securitycentermanagement/README.md index 60e13ef2af0..e0eb83c6a6e 100644 --- a/packages/google-cloud-securitycentermanagement/README.md +++ b/packages/google-cloud-securitycentermanagement/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Security Center Management API API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -207,4 +207,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=securitycentermanagement.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-securitycentermanagement/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto b/packages/google-cloud-securitycentermanagement/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto index dca152b5bc4..ff623fef501 100644 --- a/packages/google-cloud-securitycentermanagement/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto +++ b/packages/google-cloud-securitycentermanagement/protos/google/cloud/securitycentermanagement/v1/security_center_management.proto @@ -50,10 +50,11 @@ service SecurityCenterManagement { option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - // given parent. This includes resident modules defined at the scope of the - // parent, and inherited modules, inherited from CRM ancestors (no - // descendants). + // Returns a list of all + // [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] + // resources for the given parent. This includes resident modules defined at + // the scope of the parent, and inherited modules, inherited from ancestor + // organizations, folders, and projects (no descendants). rpc ListEffectiveSecurityHealthAnalyticsCustomModules( ListEffectiveSecurityHealthAnalyticsCustomModulesRequest) returns (ListEffectiveSecurityHealthAnalyticsCustomModulesResponse) { @@ -69,7 +70,8 @@ service SecurityCenterManagement { option (google.api.method_signature) = "parent"; } - // Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule. + // Gets details of a single + // [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule]. rpc GetEffectiveSecurityHealthAnalyticsCustomModule( GetEffectiveSecurityHealthAnalyticsCustomModuleRequest) returns (EffectiveSecurityHealthAnalyticsCustomModule) { @@ -85,9 +87,11 @@ service SecurityCenterManagement { option (google.api.method_signature) = "name"; } - // Returns a list of all SecurityHealthAnalyticsCustomModules for the given - // parent. This includes resident modules defined at the scope of the parent, - // and inherited modules, inherited from CRM ancestors (no descendants). + // Returns a list of all + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // resources for the given parent. This includes resident modules defined at + // the scope of the parent, and inherited modules, inherited from ancestor + // organizations, folders, and projects (no descendants). rpc ListSecurityHealthAnalyticsCustomModules( ListSecurityHealthAnalyticsCustomModulesRequest) returns (ListSecurityHealthAnalyticsCustomModulesResponse) { @@ -103,8 +107,10 @@ service SecurityCenterManagement { option (google.api.method_signature) = "parent"; } - // Returns a list of all resident SecurityHealthAnalyticsCustomModules under - // the given CRM parent and all of the parent's CRM descendants. + // Returns a list of all resident + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // resources under the given organization, folder, or project and all of its + // descendants. rpc ListDescendantSecurityHealthAnalyticsCustomModules( ListDescendantSecurityHealthAnalyticsCustomModulesRequest) returns (ListDescendantSecurityHealthAnalyticsCustomModulesResponse) { @@ -120,7 +126,8 @@ service SecurityCenterManagement { option (google.api.method_signature) = "parent"; } - // Retrieves a SecurityHealthAnalyticsCustomModule. + // Retrieves a + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule]. rpc GetSecurityHealthAnalyticsCustomModule( GetSecurityHealthAnalyticsCustomModuleRequest) returns (SecurityHealthAnalyticsCustomModule) { @@ -136,10 +143,12 @@ service SecurityCenterManagement { option (google.api.method_signature) = "name"; } - // Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - // given CRM parent, and also creates inherited - // SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - // parent. These modules are enabled by default. + // Creates a resident + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // at the scope of the given organization, folder, or project, and also + // creates inherited `SecurityHealthAnalyticsCustomModule` resources for all + // folders and projects that are descendants of the given parent. These + // modules are enabled by default. rpc CreateSecurityHealthAnalyticsCustomModule( CreateSecurityHealthAnalyticsCustomModuleRequest) returns (SecurityHealthAnalyticsCustomModule) { @@ -159,11 +168,13 @@ service SecurityCenterManagement { "parent,security_health_analytics_custom_module"; } - // Updates the SecurityHealthAnalyticsCustomModule under the given name based - // on the given update mask. Updating the enablement state is supported on - // both resident and inherited modules (though resident modules cannot have an - // enablement state of "inherited"). Updating the display name and custom - // config of a module is supported on resident modules only. + // Updates the + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // under the given name based on the given update mask. Updating the + // enablement state is supported on both resident and inherited modules + // (though resident modules cannot have an enablement state of "inherited"). + // Updating the display name and custom configuration of a module is supported + // on resident modules only. rpc UpdateSecurityHealthAnalyticsCustomModule( UpdateSecurityHealthAnalyticsCustomModuleRequest) returns (SecurityHealthAnalyticsCustomModule) { @@ -183,9 +194,10 @@ service SecurityCenterManagement { "security_health_analytics_custom_module,update_mask"; } - // Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - // descendants in the CRM hierarchy. This method is only supported for - // resident custom modules. + // Deletes the specified + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // and all of its descendants in the resource hierarchy. This method is only + // supported for resident custom modules. rpc DeleteSecurityHealthAnalyticsCustomModule( DeleteSecurityHealthAnalyticsCustomModuleRequest) returns (google.protobuf.Empty) { @@ -201,7 +213,9 @@ service SecurityCenterManagement { option (google.api.method_signature) = "name"; } - // Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + // Simulates the result of using a + // [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] + // to check a resource. rpc SimulateSecurityHealthAnalyticsCustomModule( SimulateSecurityHealthAnalyticsCustomModuleRequest) returns (SimulateSecurityHealthAnalyticsCustomModuleResponse) { @@ -238,13 +252,18 @@ service SecurityCenterManagement { option (google.api.method_signature) = "parent"; } - // Gets an effective ETD custom module. Retrieves the effective module at the - // given level. The difference between an EffectiveCustomModule and a - // CustomModule is that the fields for an EffectiveCustomModule are computed - // from ancestors if needed. For example, the enablement_state for a - // CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the - // enablement_state for an EffectiveCustomModule is always computed to ENABLED - // or DISABLED (the effective enablement_state). + // Gets the effective Event Threat Detection custom module at the given level. + // + // The difference between an + // [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] + // and an + // [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] + // is that the fields for an `EffectiveEventThreatDetectionCustomModule` are + // computed from ancestors if needed. For example, the enablement state for an + // `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or + // `INHERITED`. In contrast, the enablement state for an + // `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` + // or `DISABLED`. rpc GetEffectiveEventThreatDetectionCustomModule( GetEffectiveEventThreatDetectionCustomModuleRequest) returns (EffectiveEventThreatDetectionCustomModule) { @@ -260,9 +279,9 @@ service SecurityCenterManagement { option (google.api.method_signature) = "name"; } - // Lists all Event Threat Detection custom modules for the given - // Resource Manager parent. This includes resident modules defined at the - // scope of the parent along with modules inherited from ancestors. + // Lists all Event Threat Detection custom modules for the given organization, + // folder, or project. This includes resident modules defined at the scope of + // the parent along with modules inherited from ancestors. rpc ListEventThreatDetectionCustomModules( ListEventThreatDetectionCustomModulesRequest) returns (ListEventThreatDetectionCustomModulesResponse) { @@ -278,8 +297,8 @@ service SecurityCenterManagement { option (google.api.method_signature) = "parent"; } - // Lists all resident Event Threat Detection custom modules under the - // given Resource Manager parent and its descendants. + // Lists all resident Event Threat Detection custom modules for the given + // organization, folder, or project and its descendants. rpc ListDescendantEventThreatDetectionCustomModules( ListDescendantEventThreatDetectionCustomModulesRequest) returns (ListDescendantEventThreatDetectionCustomModulesResponse) { @@ -312,9 +331,9 @@ service SecurityCenterManagement { } // Creates a resident Event Threat Detection custom module at the scope of the - // given Resource Manager parent, and also creates inherited custom modules - // for all descendants of the given parent. These modules are enabled by - // default. + // given organization, folder, or project, and creates inherited custom + // modules for all descendants of the given parent. These modules are enabled + // by default. rpc CreateEventThreatDetectionCustomModule( CreateEventThreatDetectionCustomModuleRequest) returns (EventThreatDetectionCustomModule) { @@ -360,8 +379,8 @@ service SecurityCenterManagement { } // Deletes the specified Event Threat Detection custom module and all of its - // descendants in the Resource Manager hierarchy. This method is only - // supported for resident custom modules. + // descendants in the resource hierarchy. This method is only supported for + // resident custom modules. rpc DeleteEventThreatDetectionCustomModule( DeleteEventThreatDetectionCustomModuleRequest) returns (google.protobuf.Empty) { @@ -450,7 +469,7 @@ service SecurityCenterManagement { // settings information such as top-level enablement in addition to individual // module settings. Service settings can be configured at the organization, // folder, or project level. Service settings at the organization or folder -// level are inherited by those in child folders and projects. +// level are inherited by those in descendant folders and projects. message SecurityCenterService { option (google.api.resource) = { type: "securitycentermanagement.googleapis.com/SecurityCenterService" @@ -463,29 +482,27 @@ message SecurityCenterService { // The settings for individual modules. message ModuleSettings { - // Optional. The intended state of enablement for the module at its level of + // Optional. The intended enablement state for the module at its level of // the resource hierarchy. EnablementState intended_enablement_state = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. The effective enablement state for the module at its level - // of the resource hierarchy. If the intended state is set to INHERITED, the - // effective state will be inherited from the enablement state of an - // ancestor. This state may - // differ from the intended enablement state due to billing eligibility or - // onboarding status. + // of the resource hierarchy. If the intended state is set to `INHERITED`, + // the effective state will be inherited from the enablement state of an + // ancestor. This state may differ from the intended enablement state due to + // billing eligibility or onboarding status. EnablementState effective_enablement_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Represents the possible intended states of enablement for a service or - // module. + // Represents the possible enablement states for a service or module. enum EnablementState { // Default value. This value is unused. ENABLEMENT_STATE_UNSPECIFIED = 0; - // State is inherited from the parent resource. Not a valid effective - // enablement state. + // State is inherited from the parent resource. Valid as an intended + // enablement state, but not as an effective enablement state. INHERITED = 1; // State is enabled. @@ -494,70 +511,67 @@ message SecurityCenterService { // State is disabled. DISABLED = 3; - // SCC is configured to ingest findings from this service but not enable - // this service. Not a valid intended_enablement_state (that is, this is a - // readonly state). + // Security Command Center is configured to ingest findings from this + // service, but not to enable this service. This state indicates that + // Security Command Center is misconfigured. You can't set this state + // yourself. INGEST_ONLY = 4; } - // Identifier. The name of the service. - // - // Its format is: + // Identifier. The name of the service, in one of the following formats: // - // * organizations/{organization}/locations/{location}/securityCenterServices/{service} - // * folders/{folder}/locations/{location}/securityCenterServices/{service} - // * projects/{project}/locations/{location}/securityCenterServices/{service} + // * `organizations/{organization}/locations/{location}/securityCenterServices/{service}` + // * `folders/{folder}/locations/{location}/securityCenterServices/{service}` + // * `projects/{project}/locations/{location}/securityCenterServices/{service}` // - // The possible values for id {service} are: + // The following values are valid for `{service}`: // - // * container-threat-detection - // * event-threat-detection - // * security-health-analytics - // * vm-threat-detection - // * web-security-scanner + // * `container-threat-detection` + // * `event-threat-detection` + // * `security-health-analytics` + // * `vm-threat-detection` + // * `web-security-scanner` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Optional. The intended state of enablement for the service at its level of - // the resource hierarchy. A DISABLED state will override all module - // enablement_states to DISABLED. + // Optional. The intended enablement state for the service at its level of the + // resource hierarchy. A `DISABLED` state will override all module enablement + // states to `DISABLED`. EnablementState intended_enablement_state = 2 [(google.api.field_behavior) = OPTIONAL]; // Output only. The effective enablement state for the service at its level of - // the resource hierarchy. If the intended state is set to INHERITED, the + // the resource hierarchy. If the intended state is set to `INHERITED`, the // effective state will be inherited from the enablement state of an ancestor. // This state may differ from the intended enablement state due to billing // eligibility or onboarding status. EnablementState effective_enablement_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The configurations including the state of enablement for the - // service's different modules. The absence of a module in the map implies its + // Optional. The module configurations, including the enablement state for the + // service's modules. The absence of a module in the map implies that its // configuration is inherited from its parents. map modules = 4 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the service was last updated. This could be due to an - // explicit user update or due to a side effect of another system change such + // explicit user update or due to a side effect of another system change, such // as billing subscription expiry. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Additional service specific configuration. Not all services will + // Optional. Additional service-specific configuration. Not all services will // utilize this field. google.protobuf.Struct service_config = 6 [(google.api.field_behavior) = OPTIONAL]; } -// An EffectiveSecurityHealthAnalyticsCustomModule is the representation of -// a Security Health Analytics custom module at a specified level of the -// resource hierarchy: organization, folder, or project. If a custom module is -// inherited from a parent organization or folder, the value of the -// `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is -// set to the value that is effective in the parent, instead of `INHERITED`. -// For example, if the module is enabled in a parent organization or folder, the -// effective enablement_state for the module in all child folders or projects is -// also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only. +// The representation of a Security Health Analytics custom module at a +// specified level of the resource hierarchy: organization, folder, or project. +// If a custom module is inherited from an ancestor organization or folder, then +// the enablement state is set to the value that is effective in the parent, not +// to `INHERITED`. For example, if the module is enabled in an organization or +// folder, then the effective enablement state for the module is `ENABLED` in +// all descendant folders or projects. message EffectiveSecurityHealthAnalyticsCustomModule { option (google.api.resource) = { type: "securitycentermanagement.googleapis.com/EffectiveSecurityHealthAnalyticsCustomModule" @@ -570,7 +584,7 @@ message EffectiveSecurityHealthAnalyticsCustomModule { // The enablement state of the module. enum EnablementState { - // Unspecified enablement state. + // Default value. This value is unused. ENABLEMENT_STATE_UNSPECIFIED = 0; // The module is enabled at the given level. @@ -580,18 +594,18 @@ message EffectiveSecurityHealthAnalyticsCustomModule { DISABLED = 2; } - // Identifier. The full resource name of the custom module, specified in one - // of the following formats: + // Identifier. The full resource name of the custom module, in one of the + // following formats: // - // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. The user-specified configuration for the module. CustomConfig custom_config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The effective state of enablement for the module at the given + // Output only. The effective enablement state for the module at the given // level of the hierarchy. EnablementState enablement_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -602,15 +616,15 @@ message EffectiveSecurityHealthAnalyticsCustomModule { string display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Request message for listing effective Security Health Analytics custom -// modules. +// Request message for +// [SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules]. message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest { - // Required. Name of parent to list effective custom modules. specified in one - // of the following formats: + // Required. Name of parent to list effective custom modules, in one of the + // following formats: + // // * `organizations/{organization}/locations/{location}` // * `folders/{folder}/locations/{location}` - // or - // `projects/{project}/locations/{location}` + // * `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -622,29 +636,35 @@ message ListEffectiveSecurityHealthAnalyticsCustomModulesRequest { // Default is 10, minimum is 1, maximum is 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The value returned by the last call indicating a continuation. + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for listing effective Security Health Analytics custom -// modules. +// Response message for +// [SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveSecurityHealthAnalyticsCustomModules]. message ListEffectiveSecurityHealthAnalyticsCustomModulesResponse { - // The list of EffectiveSecurityHealthAnalyticsCustomModule + // The list of effective Security Health Analytics custom modules. repeated EffectiveSecurityHealthAnalyticsCustomModule effective_security_health_analytics_custom_modules = 1; - // A token identifying a page of results the server should return. + // A pagination token. To retrieve the next page of results, call the method + // again with this token. string next_page_token = 2; } -// Message for getting a EffectiveSecurityHealthAnalyticsCustomModule +// Request message for +// [SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveSecurityHealthAnalyticsCustomModule]. message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { // Required. The full resource name of the custom module, specified in one of // the following formats: // - // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + // * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -657,7 +677,7 @@ message GetEffectiveSecurityHealthAnalyticsCustomModuleRequest { // including its full module name, display name, enablement state, and last // updated time. You can create a custom module at the organization, folder, or // project level. Custom modules that you create at the organization or folder -// level are inherited by the child folders and projects. +// level are inherited by the descendant folders and projects. message SecurityHealthAnalyticsCustomModule { option (google.api.resource) = { type: "securitycentermanagement.googleapis.com/SecurityHealthAnalyticsCustomModule" @@ -670,34 +690,35 @@ message SecurityHealthAnalyticsCustomModule { // Possible enablement states of a custom module. enum EnablementState { - // Unspecified enablement state. + // Default value. This value is unused. ENABLEMENT_STATE_UNSPECIFIED = 0; - // The module is enabled at the given CRM resource. + // The module is enabled at the given organization, folder, or project. ENABLED = 1; - // The module is disabled at the given CRM resource. + // The module is disabled at the given organization, folder, or project. DISABLED = 2; // State is inherited from an ancestor module. The module will either - // be effectively ENABLED or DISABLED based on its closest non-inherited - // ancestor module in the CRM hierarchy. Attempting to set a top level - // module (module with no parent) to the INHERITED state will result in an - // INVALID_ARGUMENT error. + // be effectively `ENABLED` or `DISABLED` based on its closest non-inherited + // ancestor module in the resource hierarchy. If you try to set a top-level + // module (a module with no parent) to the `INHERITED` state, you receive an + // `INVALID_ARGUMENT` error. INHERITED = 3; } - // Identifier. The full resource name of the custom module, specified in one - // of the following formats: - // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` - // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}` + // Identifier. The full resource name of the custom module, in one of the + // following formats: + // + // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Optional. The display name of the Security Health Analytics custom module. // This display name becomes the finding category for all findings that are - // returned by this custom module. The display name must be between 1 and - // 128 characters, start with a lowercase letter, and contain alphanumeric + // returned by this custom module. The display name must be between 1 and 128 + // characters, start with a lowercase letter, and contain alphanumeric // characters or underscores only. string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -722,7 +743,7 @@ message SecurityHealthAnalyticsCustomModule { } ]; - // Optional. The user specified custom configuration for the module. + // Optional. The user-specified custom configuration for the module. CustomConfig custom_config = 7 [(google.api.field_behavior) = OPTIONAL]; } @@ -732,8 +753,7 @@ message SecurityHealthAnalyticsCustomModule { message CustomConfig { // A set of optional name-value pairs that define custom source properties to // return with each finding that is generated by the custom module. The custom - // source properties that are defined here are included in the finding JSON - // under `sourceProperties`. + // source properties that are defined here are included in the finding. message CustomOutputSpec { // An individual name-value pair that defines a custom source property. message Property { @@ -759,7 +779,7 @@ message CustomConfig { // Defines the valid value options for the severity of a finding. enum Severity { - // Unspecified severity. + // Default value. This value is unused. SEVERITY_UNSPECIFIED = 0; // Critical severity. @@ -775,8 +795,9 @@ message CustomConfig { LOW = 4; } - // Optional. The CEL expression to evaluate to produce findings. When the - // expression evaluates to true against a resource, a finding is generated. + // Optional. The Common Expression Language (CEL) expression to evaluate to + // produce findings. When the expression evaluates to `true` against a + // resource, a finding is generated. google.type.Expr predicate = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Custom output properties. @@ -800,15 +821,15 @@ message CustomConfig { // Optional. An explanation of the recommended steps that security teams can // take to resolve the detected issue. This explanation is returned with each - // finding generated by this module in the `nextSteps` property of the finding - // JSON. + // finding generated by this module. string recommendation = 6 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for listing Security Health Analytics custom modules. +// Request message for +// [SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules]. message ListSecurityHealthAnalyticsCustomModulesRequest { - // Required. Name of parent organization, folder, or project in which to list - // custom modules, specified in one of the following formats: + // Required. Name of the parent organization, folder, or project in which to + // list custom modules, in one of the following formats: // // * `organizations/{organization}/locations/{location}` // * `folders/{folder}/locations/{location}` @@ -824,25 +845,31 @@ message ListSecurityHealthAnalyticsCustomModulesRequest { // Default is 10, minimum is 1, maximum is 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A token identifying a page of results the server should return. + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for listing Security Health Analytics custom modules. +// Response message for +// [SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityHealthAnalyticsCustomModules]. message ListSecurityHealthAnalyticsCustomModulesResponse { - // The list of SecurityHealthAnalyticsCustomModules + // The list of Security Health Analytics custom modules. repeated SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - // A token identifying a page of results the server should return. + // A pagination token. To retrieve the next page of results, call the method + // again with this token. string next_page_token = 2; } -// Request message for listing descendant Security Health Analytics custom -// modules. +// Request message for +// [SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules]. message ListDescendantSecurityHealthAnalyticsCustomModulesRequest { // Required. Name of the parent organization, folder, or project in which to - // list custom modules, specified in one of the following formats: + // list custom modules, in one of the following formats: // // * `organizations/{organization}/locations/{location}` // * `folders/{folder}/locations/{location}` @@ -858,24 +885,31 @@ message ListDescendantSecurityHealthAnalyticsCustomModulesRequest { // Default is 10, minimum is 1, maximum is 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A token identifying a page of results the server should return. + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for listing descendant Security Health Analytics custom -// modules. +// Response message for +// [SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantSecurityHealthAnalyticsCustomModules]. message ListDescendantSecurityHealthAnalyticsCustomModulesResponse { // The list of SecurityHealthAnalyticsCustomModules repeated SecurityHealthAnalyticsCustomModule security_health_analytics_custom_modules = 1; - // A token identifying a page of results the server should return. + // A pagination token. To retrieve the next page of results, call the method + // again with this token. string next_page_token = 2; } -// Message for getting a SecurityHealthAnalyticsCustomModule +// Request message for +// [SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityHealthAnalyticsCustomModule]. message GetSecurityHealthAnalyticsCustomModuleRequest { - // Required. Name of the resource + // Required. Name of the resource, in the format + // `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -884,10 +918,11 @@ message GetSecurityHealthAnalyticsCustomModuleRequest { ]; } -// Message for creating a SecurityHealthAnalyticsCustomModule +// Request message for +// [SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateSecurityHealthAnalyticsCustomModule]. message CreateSecurityHealthAnalyticsCustomModuleRequest { // Required. Name of the parent organization, folder, or project of the - // module, specified in one of the following formats: + // module, in one of the following formats: // // * `organizations/{organization}/locations/{location}` // * `folders/{folder}/locations/{location}` @@ -899,53 +934,68 @@ message CreateSecurityHealthAnalyticsCustomModuleRequest { } ]; - // Required. The resource being created + // Required. The resource being created. SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. When set to true, only validations (including IAM checks) will - // done for the request (no module will be created). An OK response indicates - // the request is valid while an error response indicates the request is - // invalid. Note that a subsequent request to actually create the module could - // still fail because: - // 1. the state could have changed (e.g. IAM permission lost) or - // 2. A failure occurred during creation of the module. - // Defaults to false. + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be created. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to create the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Message for updating a SecurityHealthAnalyticsCustomModule +// Request message for +// [SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityHealthAnalyticsCustomModule]. message UpdateSecurityHealthAnalyticsCustomModuleRequest { - // Required. The list of fields to be updated. The only fields that can be - // updated are `enablement_state` and `custom_config`. If empty or set to the - // wildcard value `*`, both `enablement_state` and `custom_config` are - // updated. + // Required. The fields to update. The following values are valid: + // + // * `custom_config` + // * `enablement_state` + // + // If you omit this field or set it to the wildcard value `*`, then all + // eligible fields are updated. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The resource being updated + // Required. The resource being updated. SecurityHealthAnalyticsCustomModule security_health_analytics_custom_module = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. When set to true, only validations (including IAM checks) will - // done for the request (module will not be updated). An OK response indicates - // the request is valid while an error response indicates the request is - // invalid. Note that a subsequent request to actually update the module could - // still fail because 1. the state could have changed (e.g. IAM permission - // lost) or - // 2. A failure occurred while trying to update the module. + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be updated. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to update the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Message for deleting a SecurityHealthAnalyticsCustomModule +// Request message for +// [SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteSecurityHealthAnalyticsCustomModule]. message DeleteSecurityHealthAnalyticsCustomModuleRequest { - // Required. The resource name of the SHA custom module. - // - // Its format is: + // Required. The resource name of the SHA custom module, in one of the + // following formats: // - // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + // * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -953,42 +1003,52 @@ message DeleteSecurityHealthAnalyticsCustomModuleRequest { } ]; - // Optional. When set to true, only validations (including IAM checks) will - // done for the request (module will not be deleted). An OK response indicates - // the request is valid while an error response indicates the request is - // invalid. Note that a subsequent request to actually delete the module could - // still fail because 1. the state could have changed (e.g. IAM permission - // lost) or - // 2. A failure occurred while trying to delete the module. + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be deleted. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to delete the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during deletion of the module + // + // Defaults to `false`. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request message to simulate a CustomConfig against a given test resource. -// Maximum size of the request is 4 MB by default. +// Request message for +// [SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule]. +// The maximum size of the request is 4 MiB. message SimulateSecurityHealthAnalyticsCustomModuleRequest { - // Manually constructed resource name. If the custom module evaluates against - // only the resource data, you can omit the `iam_policy_data` field. If it - // evaluates only the `iam_policy_data` field, you can omit the resource data. + // Manually constructed information about a resource. message SimulatedResource { - // Required. The type of the resource, for example, + // Required. The type of the resource. For example, // `compute.googleapis.com/Disk`. string resource_type = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. A representation of the Google Cloud resource. Should match the // Google Cloud resource JSON format. + // + // If the custom module evaluates only the IAM allow policy, then you can + // omit this field. google.protobuf.Struct resource_data = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A representation of the IAM policy. + // Optional. A representation of the IAM allow policy. + // + // If the custom module evaluates only the resource data, then you can omit + // this field. google.iam.v1.Policy iam_policy_data = 3 [(google.api.field_behavior) = OPTIONAL]; } // Required. The relative resource name of the organization, project, or - // folder. For more information about relative resource names, see [Relative - // Resource - // Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - // Example: `organizations/{organization_id}`. + // folder. For more information about relative resource names, see [AIP-122: + // Resource names](https://google.aip.dev/122). Example: + // `organizations/{organization_id}`. string parent = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The custom configuration that you need to test. @@ -998,8 +1058,8 @@ message SimulateSecurityHealthAnalyticsCustomModuleRequest { SimulatedResource resource = 3 [(google.api.field_behavior) = REQUIRED]; } -// A subset of the fields of the Security Center Finding proto. The minimum set -// of fields needed to represent a simulated finding from a SHA custom module. +// The minimum set of fields needed to represent a simulated finding from a +// Security Health Analytics custom module. message SimulatedFinding { option (google.api.resource) = { type: "securitycenter.googleapis.com/Finding" @@ -1012,97 +1072,92 @@ message SimulatedFinding { // The state of the finding. enum State { - // Unspecified state. + // Default value. This value is unused. STATE_UNSPECIFIED = 0; // The finding requires attention and has not been addressed yet. ACTIVE = 1; - // The finding has been fixed, triaged as a non-issue or otherwise addressed - // and is no longer active. + // The finding has been fixed, triaged as a non-issue, or otherwise + // addressed and is no longer active. INACTIVE = 2; } // The severity of the finding. enum Severity { - // This value is used for findings when a source doesn't write a severity - // value. + // Default value. This value is unused. SEVERITY_UNSPECIFIED = 0; - // Vulnerability: - // A critical vulnerability is easily discoverable by an external actor, - // exploitable, and results in the direct ability to execute arbitrary code, - // exfiltrate data, and otherwise gain additional access and privileges to - // cloud resources and workloads. Examples include publicly accessible - // unprotected user data and public SSH access with weak or no - // passwords. + // For vulnerabilities: A critical vulnerability is easily discoverable by + // an external actor, exploitable, and results in the direct ability to + // execute arbitrary code, exfiltrate data, and otherwise gain additional + // access and privileges to cloud resources and workloads. Examples include + // publicly accessible unprotected user data and public SSH access with weak + // or no passwords. // - // Threat: - // Indicates a threat that is able to access, modify, or delete data or - // execute unauthorized code within existing resources. + // For threats: Indicates a threat that is able to access, modify, or delete + // data or execute unauthorized code within existing resources. CRITICAL = 1; - // Vulnerability: - // A high risk vulnerability can be easily discovered and exploited in - // combination with other vulnerabilities in order to gain direct access and - // the ability to execute arbitrary code, exfiltrate data, and otherwise - // gain additional access and privileges to cloud resources and workloads. - // An example is a database with weak or no passwords that is only - // accessible internally. This database could easily be compromised by an - // actor that had access to the internal network. + // For vulnerabilities: A high-risk vulnerability can be easily discovered + // and exploited in combination with other vulnerabilities in order to gain + // direct access and the ability to execute arbitrary code, exfiltrate data, + // and otherwise gain additional access and privileges to cloud resources + // and workloads. An example is a database with weak or no passwords that is + // only accessible internally. This database could easily be compromised by + // an actor that had access to the internal network. // - // Threat: - // Indicates a threat that is able to create new computational resources in - // an environment but not able to access data or execute code in existing - // resources. + // For threats: Indicates a threat that is able to create new computational + // resources in an environment but not able to access data or execute code + // in existing resources. HIGH = 2; - // Vulnerability: - // A medium risk vulnerability could be used by an actor to gain access to - // resources or privileges that enable them to eventually (through multiple - // steps or a complex exploit) gain access and the ability to execute - // arbitrary code or exfiltrate data. An example is a service account with - // access to more projects than it should have. If an actor gains access to - // the service account, they could potentially use that access to manipulate - // a project the service account was not intended to. + // For vulnerabilities: A medium-risk vulnerability could be used by an + // actor to gain access to resources or privileges that enable them to + // eventually (through multiple steps or a complex exploit) gain access and + // the ability to execute arbitrary code or exfiltrate data. An example is a + // service account with access to more projects than it should have. If an + // actor gains access to the service account, they could potentially use + // that access to manipulate a project the service account was not intended + // to. // - // Threat: - // Indicates a threat that is able to cause operational impact but may not - // access data or execute unauthorized code. + // For threats: Indicates a threat that is able to cause operational impact + // but may not access data or execute unauthorized code. MEDIUM = 3; - // Vulnerability: - // A low risk vulnerability hampers a security organization's ability to - // detect vulnerabilities or active threats in their deployment, or prevents - // the root cause investigation of security issues. An example is monitoring - // and logs being disabled for resource configurations and access. + // For vulnerabilities: A low-risk vulnerability hampers a security + // organization's ability to detect vulnerabilities or active threats in + // their deployment, or prevents the root cause investigation of security + // issues. An example is monitoring and logs being disabled for resource + // configurations and access. // - // Threat: - // Indicates a threat that has obtained minimal access to an environment but - // is not able to access data, execute code, or create resources. + // For threats: Indicates a threat that has obtained minimal access to an + // environment but is not able to access data, execute code, or create + // resources. LOW = 4; } - // Represents what kind of Finding it is. + // Represents what kind of finding it is. enum FindingClass { - // Unspecified finding class. + // Default value. This value is unused. FINDING_CLASS_UNSPECIFIED = 0; // Describes unwanted or malicious activity. THREAT = 1; // Describes a potential weakness in software that increases risk to - // Confidentiality & Integrity & Availability. + // confidentiality, integrity, and availability. VULNERABILITY = 2; - // Describes a potential weakness in cloud resource/asset configuration that - // increases risk. + // Describes a potential weakness in cloud resource or asset configuration + // that increases risk. MISCONFIGURATION = 3; // Describes a security observation that is for informational purposes. OBSERVATION = 4; - // Describes an error that prevents some SCC functionality. + // Describes an error that prevents Security Command Center from working + // correctly. SCC_ERROR = 5; // Describes a potential security risk due to a change in the security @@ -1114,50 +1169,51 @@ message SimulatedFinding { TOXIC_COMBINATION = 7; } - // Identifier. The [relative resource - // name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - // of the finding. Example: - // `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, - // `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, - // `projects/{project_id}/sources/{source_id}/findings/{finding_id}`. + // Identifier. The [relative resource name](https://google.aip.dev/122) of the + // finding, in one of the following formats: + // + // * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + // * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + // * `projects/{project_id}/sources/{source_id}/findings/{finding_id}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // The relative resource name of the source the finding belongs to. See: - // https://cloud.google.com/apis/design/resource_names#relative_resource_name - // This field is immutable after creation time. - // For example: - // `organizations/{organization_id}/sources/{source_id}` + // The [relative resource name](https://google.aip.dev/122) of the source the + // finding belongs to. For example, + // `organizations/{organization_id}/sources/{source_id}`. This field is + // immutable after creation time. string parent = 2; - // For findings on Google Cloud resources, the full resource - // name of the Google Cloud resource this finding is for. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name - // When the finding is for a non-Google Cloud resource, the resourceName can - // be a customer or partner defined string. This field is immutable after - // creation time. + // For findings on Google Cloud resources, the + // [full resource name](https://google.aip.dev/122#full-resource-names) of the + // Google Cloud resource this finding is for. When the finding is for a + // non-Google Cloud resource, the value can be a customer or partner defined + // string. This field is immutable after creation time. string resource_name = 3; - // The additional taxonomy group within findings from a given source. - // This field is immutable after creation time. - // Example: "XSS_FLASH_INJECTION" + // The additional taxonomy group within findings from a given source. For + // example, `XSS_FLASH_INJECTION`. This field is immutable after creation + // time. string category = 4; // Output only. The state of the finding. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Source specific properties. These properties are managed by the source - // that writes the finding. The key names in the source_properties map must be - // between 1 and 255 characters, and must start with a letter and contain - // alphanumeric characters or underscores only. + // Source-specific properties. These properties are managed by the source + // that writes the finding. The key names must be between 1 and 255 + // characters; they must start with a letter and contain alphanumeric + // characters or underscores only. map source_properties = 6; // The time the finding was first detected. If an existing finding is updated, - // then this is the time the update occurred. + // then this is the time the update occurred. If the finding is later + // resolved, then this time reflects when the finding was resolved. + // // For example, if the finding represents an open firewall, this property // captures the time the detector believes the firewall became open. The - // accuracy is determined by the detector. If the finding is later resolved, - // then this time reflects when the finding was resolved. This must not - // be set to a value greater than the current timestamp. + // accuracy is determined by the detector. + // + // The event time must not be set to a value greater than the current + // timestamp. google.protobuf.Timestamp event_time = 7; // The severity of the finding. This field is managed by the source that @@ -1168,14 +1224,15 @@ message SimulatedFinding { FindingClass finding_class = 9; } -// Response message for simulating a `SecurityHealthAnalyticsCustomModule` -// against a given resource. +// Response message for +// [SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.SimulateSecurityHealthAnalyticsCustomModule]. message SimulateSecurityHealthAnalyticsCustomModuleResponse { // Possible test result. message SimulatedResult { + // The result of the simulation. oneof result { - // Finding that would be published for the test case, - // if a violation is detected. + // Finding that would be published for the test case if a violation is + // detected. SimulatedFinding finding = 1; // Indicates that the test case does not trigger any violation. @@ -1190,13 +1247,13 @@ message SimulateSecurityHealthAnalyticsCustomModuleResponse { SimulatedResult result = 1; } -// An EffectiveEventThreatDetectionCustomModule is the representation of -// EventThreatDetectionCustomModule at a given level taking hierarchy into -// account and resolving various fields accordingly. e.g. if the module is -// enabled at the ancestor level, effective modules at all descendant levels -// will have enablement_state set to ENABLED. Similarly, if module.inherited is -// set, then effective module's config will contain the ancestor's config -// details. EffectiveEventThreatDetectionCustomModule is read-only. +// The representation of an +// [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] +// at a given level, taking hierarchy into account and resolving various fields +// accordingly. For example, if the module is enabled at the ancestor level, +// then effective modules at all descendant levels will have their enablement +// state set to `ENABLED`. Similarly, if `module.inherited` is set, then the +// effective module's configuration will reflect the ancestor's configuration. message EffectiveEventThreatDetectionCustomModule { option (google.api.resource) = { type: "securitycentermanagement.googleapis.com/EffectiveEventThreatDetectionCustomModule" @@ -1209,7 +1266,7 @@ message EffectiveEventThreatDetectionCustomModule { // The enablement state of the module. enum EnablementState { - // Unspecified enablement state. + // Default value. This value is unused. ENABLEMENT_STATE_UNSPECIFIED = 0; // The module is enabled at the given level. @@ -1219,16 +1276,15 @@ message EffectiveEventThreatDetectionCustomModule { DISABLED = 2; } - // Identifier. The resource name of the ETD custom module. - // - // Its format is: + // Identifier. The resource name of the Event Threat Detection custom module, + // in one of the following formats: // - // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Output only. Config for the effective module. + // Output only. Configuration for the effective module. google.protobuf.Struct config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The effective state of enablement for the module at the given @@ -1236,24 +1292,25 @@ message EffectiveEventThreatDetectionCustomModule { EnablementState enablement_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP. + // Output only. Type for the module (for example, `CONFIGURABLE_BAD_IP`). string type = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The human readable name to be displayed for the module. + // Output only. The human-readable name of the module. string display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The description for the module. + // Output only. A description of the module. string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Request message for listing effective Event Threat Detection custom -// modules. +// Request message for +// [SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules]. message ListEffectiveEventThreatDetectionCustomModulesRequest { - // Required. Name of parent to list effective custom modules. Its format is - // `organizations/{organization}/locations/{location}`, - // `folders/{folder}/locations/{location}`, - // or - // `projects/{project}/locations/{location}` + // Required. Name of parent to list effective custom modules, in one of the + // following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1265,30 +1322,35 @@ message ListEffectiveEventThreatDetectionCustomModulesRequest { // Default is 10, minimum is 1, maximum is 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The value returned by the last call indicating a continuation + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for listing effective Event Threat Detection custom -// modules. +// Response message for +// [SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEffectiveEventThreatDetectionCustomModules]. message ListEffectiveEventThreatDetectionCustomModulesResponse { - // The list of EffectiveEventThreatDetectionCustomModules + // The list of effective Event Threat Detection custom modules. repeated EffectiveEventThreatDetectionCustomModule effective_event_threat_detection_custom_modules = 1; - // A token identifying a page of results the server should return. + // A pagination token. To retrieve the next page of results, call the method + // again with this token. string next_page_token = 2; } -// Message for getting a EffectiveEventThreatDetectionCustomModule +// Request message for +// [SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEffectiveEventThreatDetectionCustomModule]. message GetEffectiveEventThreatDetectionCustomModuleRequest { - // Required. The resource name of the ETD custom module. - // - // Its format is: + // Required. The resource name of the Event Threat Detection custom module, in + // one of the following formats: // - // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + // * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1297,9 +1359,9 @@ message GetEffectiveEventThreatDetectionCustomModuleRequest { ]; } -// An event threat detection custom module is a Cloud SCC resource that contains -// the configuration and enablement state of a custom module, which enables ETD -// to write certain findings to Cloud SCC. +// A Security Command Center resource that contains the configuration and +// enablement state of a custom module, which enables Event Threat Detection to +// write certain findings to Security Command Center. message EventThreatDetectionCustomModule { option (google.api.resource) = { type: "securitycentermanagement.googleapis.com/EventThreatDetectionCustomModule" @@ -1321,32 +1383,31 @@ message EventThreatDetectionCustomModule { // The module is disabled at the given level. DISABLED = 2; - // State is inherited from an ancestor module. The module will either - // be effectively ENABLED or DISABLED based on its closest non-inherited - // ancestor module in the CRM hierarchy. Attempting to set a top level - // module (module with no parent) to the INHERITED state will result in an - // error. + // State is inherited from an ancestor module. The module will either be + // effectively `ENABLED` or `DISABLED` based on its closest non-inherited + // ancestor module in the CRM hierarchy. If you try to set a top-level + // module (a module with no parent) to the `INHERITED` state, you receive an + // `INVALID_ARGUMENT` error. INHERITED = 3; } - // Identifier. The resource name of the ETD custom module. + // Identifier. The resource name of the Event Threat Detection custom module, + // in one of the following formats: // - // Its format is: - // - // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - // Optional. Config for the module. For the resident module, its config value - // is defined at this level. For the inherited module, its config value is - // inherited from the ancestor module. + // Optional. Configuration for the module. For the resident module, its + // configuration value is defined at this level. For the inherited module, its + // configuration value is inherited from the ancestor module. google.protobuf.Struct config = 2 [(google.api.field_behavior) = OPTIONAL]; // Output only. The closest ancestor module that this module inherits the // enablement state from. If empty, indicates that the custom module was // created in the requesting parent organization, folder, or project. The - // format is the same as the EventThreatDetectionCustomModule resource name. + // format is the same as the custom module's resource name. string ancestor_module = 3 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -1358,13 +1419,13 @@ message EventThreatDetectionCustomModule { // hierarchy. EnablementState enablement_state = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Type for the module. e.g. CONFIGURABLE_BAD_IP. + // Optional. Type for the module. For example, `CONFIGURABLE_BAD_IP`. string type = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The human readable name to be displayed for the module. + // Optional. The human-readable name of the module. string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The description for the module. + // Optional. A description of the module. string description = 7 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time the module was last updated. @@ -1375,13 +1436,15 @@ message EventThreatDetectionCustomModule { string last_editor = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Request message for listing Event Threat Detection custom modules. +// Request message for +// [SecurityCenterManagement.ListEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules]. message ListEventThreatDetectionCustomModulesRequest { - // Required. Name of parent to list custom modules. Its format is - // `organizations/{organization}/locations/{location}`, - // `folders/{folder}/locations/{location}`, - // or - // `projects/{project}/locations/{location}` + // Required. Name of parent to list custom modules, in one of the following + // formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1390,38 +1453,39 @@ message ListEventThreatDetectionCustomModulesRequest { ]; // Optional. The maximum number of modules to return. The service may return - // fewer than this value. If unspecified, at most 10 configs will be returned. + // fewer than this value. If unspecified, at most 10 modules will be returned. // The maximum value is 1000; values above 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A page token, received from a previous - // `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - // subsequent page. + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. // - // When paginating, all other parameters provided to - // `ListEventThreatDetectionCustomModules` must match the call that provided - // the page token. + // When paginating, the rest of the request must match the request that + // generated the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for listing Event Threat Detection custom modules. +// Response message for +// [SecurityCenterManagement.ListEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListEventThreatDetectionCustomModules]. message ListEventThreatDetectionCustomModulesResponse { - // The list of EventThreatDetectionCustomModules + // The list of custom modules. repeated EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - // A token identifying a page of results the server should return. + // A pagination token. To retrieve the next page of results, call the method + // again with this token. string next_page_token = 2; } -// Request message for listing descendant Event Threat Detection custom -// modules. +// Request message for +// [SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules]. message ListDescendantEventThreatDetectionCustomModulesRequest { - // Required. Name of parent to list custom modules. Its format is - // `organizations/{organization}/locations/{location}`, - // `folders/{folder}/locations/{location}`, - // or - // `projects/{project}/locations/{location}` + // Required. Name of parent to list custom modules, in one of the following + // formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1434,30 +1498,35 @@ message ListDescendantEventThreatDetectionCustomModulesRequest { // The maximum value is 1000; values above 1000 will be coerced to 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A token identifying a page of results the server should return. + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for listing descendant Event Threat Detection custom -// modules. +// Response message for +// [SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListDescendantEventThreatDetectionCustomModules]. message ListDescendantEventThreatDetectionCustomModulesResponse { - // The list of EventThreatDetectionCustomModules + // The list of custom modules. repeated EventThreatDetectionCustomModule event_threat_detection_custom_modules = 1; - // A token identifying a page of results the server should return. + // A pagination token. To retrieve the next page of results, call the method + // again with this token. string next_page_token = 2; } -// Message for getting a EventThreatDetectionCustomModule +// Request message for +// [SecurityCenterManagement.GetEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetEventThreatDetectionCustomModule]. message GetEventThreatDetectionCustomModuleRequest { - // Required. The resource name of the ETD custom module. - // - // Its format is: + // Required. The resource name of the Event Threat Detection custom module, in + // one of the following formats: // - // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1466,13 +1535,14 @@ message GetEventThreatDetectionCustomModuleRequest { ]; } -// Message for creating a EventThreatDetectionCustomModule +// Request message for +// [SecurityCenterManagement.CreateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.CreateEventThreatDetectionCustomModule]. message CreateEventThreatDetectionCustomModuleRequest { - // Required. Name of parent for the module. Its format is - // `organizations/{organization}/locations/{location}`, - // `folders/{folder}/locations/{location}`, - // or - // `projects/{project}/locations/{location}` + // Required. Name of parent for the module, in one of the following formats: + // + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1481,54 +1551,62 @@ message CreateEventThreatDetectionCustomModuleRequest { ]; // Required. The module to create. The - // event_threat_detection_custom_module.name will be ignored and server - // generated. + // [EventThreatDetectionCustomModule.name][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name] + // field is ignored; Security Command Center generates the name. EventThreatDetectionCustomModule event_threat_detection_custom_module = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. When set to true, only validations (including IAM checks) will - // done for the request (no module will be created). An OK response indicates - // the request is valid while an error response indicates the request is - // invalid. Note that a subsequent request to actually create the module could - // still fail because 1. the state could have changed (e.g. IAM permission - // lost) or - // 2. A failure occurred during creation of the module. + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be created. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to create the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; } // Message for updating a EventThreatDetectionCustomModule message UpdateEventThreatDetectionCustomModuleRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // EventThreatDetectionCustomModule resource by the update. - // The fields specified in the update_mask are relative to the resource, not - // the full request. A field will be overwritten if it is in the mask. If the - // user does not provide a mask then all fields will be overwritten. + // Required. The fields to update. If omitted, then all fields are updated. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The module being updated + // Required. The module being updated. EventThreatDetectionCustomModule event_threat_detection_custom_module = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. When set to true, only validations (including IAM checks) will - // done for the request (module will not be updated). An OK response indicates - // the request is valid while an error response indicates the request is - // invalid. Note that a subsequent request to actually update the module could - // still fail because 1. the state could have changed (e.g. IAM permission - // lost) or - // 2. A failure occurred while trying to update the module. + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be updated. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to update the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Message for deleting a EventThreatDetectionCustomModule +// Request message for +// [SecurityCenterManagement.DeleteEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.DeleteEventThreatDetectionCustomModule]. message DeleteEventThreatDetectionCustomModuleRequest { - // Required. The resource name of the ETD custom module. - // - // Its format is: + // Required. The resource name of the Event Threat Detection custom module, in + // one of the following formats: // - // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + // * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + // * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1536,23 +1614,29 @@ message DeleteEventThreatDetectionCustomModuleRequest { } ]; - // Optional. When set to true, only validations (including IAM checks) will - // done for the request (module will not be deleted). An OK response indicates - // the request is valid while an error response indicates the request is - // invalid. Note that a subsequent request to actually delete the module could - // still fail because 1. the state could have changed (e.g. IAM permission - // lost) or - // 2. A failure occurred while trying to delete the module. + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no module will be deleted. An `OK` response indicates that the + // request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to delete the module could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during creation of the module + // + // Defaults to `false`. bool validate_only = 2 [(google.api.field_behavior) = OPTIONAL]; } -// Request to validate an Event Threat Detection custom module. +// Request message for +// [SecurityCenterManagement.ValidateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule]. message ValidateEventThreatDetectionCustomModuleRequest { - // Required. Resource name of the parent to validate the Custom Module under. - // - // Its format is: + // Required. Resource name of the parent to validate the custom modules under, + // in one of the following formats: // - // * `organizations/{organization}/locations/{location}`. + // * `organizations/{organization}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1564,39 +1648,41 @@ message ValidateEventThreatDetectionCustomModuleRequest { // messages. string raw_text = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + // Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. string type = 3 [(google.api.field_behavior) = REQUIRED]; } -// Response to validating an Event Threat Detection custom module. +// Response message for +// [SecurityCenterManagement.ValidateEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ValidateEventThreatDetectionCustomModule]. message ValidateEventThreatDetectionCustomModuleResponse { // An error encountered while validating the uploaded configuration of an - // Event Threat Detection Custom Module. + // Event Threat Detection custom module. message CustomModuleValidationError { - // A description of the error, suitable for human consumption. Required. + // A human-readable description of the error. string description = 1; - // The path, in RFC 8901 JSON Pointer format, to the field that failed - // validation. This may be left empty if no specific field is affected. + // The path, in [RFC 6901: JSON + // Pointer](https://datatracker.ietf.org/doc/html/rfc6901) format, to the + // field that failed validation. Omitted if no specific field is affected. string field_path = 2; // The initial position of the error in the uploaded text version of the - // module. This field may be omitted if no specific position applies, or if - // one could not be computed. + // module. Omitted if no specific position applies, or if the position could + // not be computed. optional Position start = 3; - // The end position of the error in the uploaded text version of the - // module. This field may be omitted if no specific position applies, or if - // one could not be computed.. + // The end position of the error in the uploaded text version of the module. + // Omitted if no specific position applies, or if the position could not be + // computed. optional Position end = 4; } // A position in the uploaded text version of a module. message Position { - // The line position in the text + // The line position in the text. int32 line_number = 1; - // The column position in the line + // The column position in the line. int32 column_number = 2; } @@ -1605,23 +1691,23 @@ message ValidateEventThreatDetectionCustomModuleResponse { repeated CustomModuleValidationError errors = 2; } -// Request message for getting a Security Command Center service. +// Request message for +// [SecurityCenterManagement.GetSecurityCenterService][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.GetSecurityCenterService]. message GetSecurityCenterServiceRequest { - // Required. The Security Command Center service to retrieve. - // - // Formats: + // Required. The Security Command Center service to retrieve, in one of the + // following formats: // - // * organizations/{organization}/locations/{location}/securityCenterServices/{service} - // * folders/{folder}/locations/{location}/securityCenterServices/{service} - // * projects/{project}/locations/{location}/securityCenterServices/{service} + // * organizations/{organization}/locations/{location}/securityCenterServices/{service} + // * folders/{folder}/locations/{location}/securityCenterServices/{service} + // * projects/{project}/locations/{location}/securityCenterServices/{service} // - // The possible values for id {service} are: + // The following values are valid for `{service}`: // - // * container-threat-detection - // * event-threat-detection - // * security-health-analytics - // * vm-threat-detection - // * web-security-scanner + // * `container-threat-detection` + // * `event-threat-detection` + // * `security-health-analytics` + // * `vm-threat-detection` + // * `web-security-scanner` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1629,20 +1715,20 @@ message GetSecurityCenterServiceRequest { } ]; - // Flag that, when set, will be used to filter the ModuleSettings that are - // in scope. The default setting is that all modules will be shown. + // Set to `true` to show only modules that are in scope. By default, all + // modules are shown. bool show_eligible_modules_only = 2; } -// Request message for listing Security Command Center services. +// Request message for +// [SecurityCenterManagement.ListSecurityCenterServices][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices]. message ListSecurityCenterServicesRequest { - // Required. The name of the parent to list Security Command Center services. - // - // Formats: + // Required. The name of the parent to list Security Command Center services, + // in one of the following formats: // - // * organizations/{organization}/locations/{location} - // * folders/{folder}/locations/{location} - // * projects/{project}/locations/{location} + // * `organizations/{organization}/locations/{location}` + // * `folders/{folder}/locations/{location}` + // * `projects/{project}/locations/{location}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1654,42 +1740,57 @@ message ListSecurityCenterServicesRequest { // Default is 10, minimum is 1, maximum is 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The value returned by the last call indicating a continuation. + // Optional. A pagination token returned from a previous request. Provide this + // token to retrieve the next page of results. + // + // When paginating, the rest of the request must match the request that + // generated the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Flag that, when set, will be used to filter the ModuleSettings that are - // in scope. The default setting is that all modules will be shown. + // Flag that, when set, is used to filter the module settings that are shown. + // The default setting is that all modules are shown. bool show_eligible_modules_only = 4; } -// Response message for listing Security Command Center services. +// Response message for +// [SecurityCenterManagement.ListSecurityCenterServices][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.ListSecurityCenterServices]. message ListSecurityCenterServicesResponse { // The list of services. repeated SecurityCenterService security_center_services = 1; - // A token identifying a page of results the server should return. + // A pagination token. To retrieve the next page of results, call the method + // again with this token. string next_page_token = 2; } -// Request message for updating a Security Command Center service. +// Request message for +// [SecurityCenterManagement.UpdateSecurityCenterService][google.cloud.securitycentermanagement.v1.SecurityCenterManagement.UpdateSecurityCenterService]. message UpdateSecurityCenterServiceRequest { // Required. The updated service. SecurityCenterService security_center_service = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The list of fields to be updated. Possible values: + // Required. The fields to update. Accepts the following values: + // + // * `intended_enablement_state` + // * `modules` // - // * "intended_enablement_state" - // * "modules" + // If omitted, then all eligible fields are updated. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. When set to true, only validations (including IAM checks) will be - // done for the request (service will not be updated). An OK response - // indicates that the request is valid, while an error response indicates that - // the request is invalid. Note that a subsequent request to actually update - // the service could still fail for one of the following reasons: - // - The state could have changed (e.g. IAM permission lost). - // - A failure occurred while trying to delete the module. + // Optional. When set to `true`, the request will be validated (including IAM + // checks), but no service will be updated. An `OK` response indicates that + // the request is valid, while an error response indicates that the request is + // invalid. + // + // If the request is valid, a subsequent request to update the service could + // still fail for one of the following reasons: + // + // * The state of your cloud resources changed; for example, you lost a + // required IAM permission + // * An error occurred during update of the service + // + // Defaults to `false`. bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-securitycentermanagement/protos/protos.json b/packages/google-cloud-securitycentermanagement/protos/protos.json index 60e69ef3ba8..ce4eadc57e5 100644 --- a/packages/google-cloud-securitycentermanagement/protos/protos.json +++ b/packages/google-cloud-securitycentermanagement/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js index 180851154a6..6609ecee720 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_event_threat_detection_custom_module.js @@ -29,27 +29,29 @@ function main(parent, eventThreatDetectionCustomModule) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of parent for the module. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent for the module, in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** * Required. The module to create. The - * event_threat_detection_custom_module.name will be ignored and server - * generated. + * EventThreatDetectionCustomModule.name google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name + * field is ignored; Security Command Center generates the name. */ // const eventThreatDetectionCustomModule = {} /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred during creation of the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. */ // const validateOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js index 69c49f66617..5c6e5cfb7ab 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.create_security_health_analytics_custom_module.js @@ -30,25 +30,27 @@ function main(parent, securityHealthAnalyticsCustomModule) { */ /** * Required. Name of the parent organization, folder, or project of the - * module, specified in one of the following formats: + * module, in one of the following formats: * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` * * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** - * Required. The resource being created + * Required. The resource being created. */ // const securityHealthAnalyticsCustomModule = {} /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because: - * 1. the state could have changed (e.g. IAM permission lost) or - * 2. A failure occurred during creation of the module. - * Defaults to false. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. */ // const validateOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js index 814515c6da3..cfffc386d9c 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_event_threat_detection_custom_module.js @@ -29,21 +29,24 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` */ // const name = 'abc123' /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. */ // const validateOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js index 08ee6c87020..6fee6373e18 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.delete_security_health_analytics_custom_module.js @@ -29,21 +29,24 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the SHA custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * Required. The resource name of the SHA custom module, in one of the + * following formats: + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` */ // const name = 'abc123' /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during deletion of the module + * Defaults to `false`. */ // const validateOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js index 6b956def594..678c53d4e09 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_event_threat_detection_custom_module.js @@ -29,11 +29,11 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js index 426af370fb7..11d87d6e337 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_effective_security_health_analytics_custom_module.js @@ -31,9 +31,9 @@ function main(name) { /** * Required. The full resource name of the custom module, specified in one of * the following formats: - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js index aa7c180bd4a..9c9f91ef020 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_event_threat_detection_custom_module.js @@ -29,11 +29,11 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the ETD custom module. - * Its format is: - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_center_service.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_center_service.js index 570e74065f9..a1389ae15c2 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_center_service.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_center_service.js @@ -29,22 +29,22 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The Security Command Center service to retrieve. - * Formats: - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} - * The possible values for id {service} are: - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner + * Required. The Security Command Center service to retrieve, in one of the + * following formats: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The following values are valid for `{service}`: + * * `container-threat-detection` + * * `event-threat-detection` + * * `security-health-analytics` + * * `vm-threat-detection` + * * `web-security-scanner` */ // const name = 'abc123' /** - * Flag that, when set, will be used to filter the ModuleSettings that are - * in scope. The default setting is that all modules will be shown. + * Set to `true` to show only modules that are in scope. By default, all + * modules are shown. */ // const showEligibleModulesOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js index d485758d785..20857982d5c 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.get_security_health_analytics_custom_module.js @@ -29,7 +29,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of the resource + * Required. Name of the resource, in the format + * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. */ // const name = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js index b93dd527860..0c7e6f1be95 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_event_threat_detection_custom_modules.js @@ -29,11 +29,11 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** @@ -43,7 +43,10 @@ function main(parent) { */ // const pageSize = 1234 /** - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js index f776df66441..a841b2d90aa 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_descendant_security_health_analytics_custom_modules.js @@ -30,7 +30,7 @@ function main(parent) { */ /** * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: + * list custom modules, in one of the following formats: * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` * * `projects/{project}/locations/{location}` @@ -42,7 +42,10 @@ function main(parent) { */ // const pageSize = 1234 /** - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js index 760cf00470c..fe3606b692b 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_event_threat_detection_custom_modules.js @@ -29,11 +29,11 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** @@ -42,7 +42,10 @@ function main(parent) { */ // const pageSize = 1234 /** - * Optional. The value returned by the last call indicating a continuation + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js index dc41b6486cd..4a8d8f423e9 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_effective_security_health_analytics_custom_modules.js @@ -29,12 +29,11 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: + * Required. Name of parent to list effective custom modules, in one of the + * following formats: * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` + * * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** @@ -43,7 +42,10 @@ function main(parent) { */ // const pageSize = 1234 /** - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js index b65b6fb04a3..0840127b8fd 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_event_threat_detection_custom_modules.js @@ -29,26 +29,24 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. + * fewer than this value. If unspecified, at most 10 modules will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ // const pageSize = 1234 /** - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_center_services.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_center_services.js index 82db48cf0e8..e051aa5c402 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_center_services.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_center_services.js @@ -29,11 +29,11 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the parent to list Security Command Center services. - * Formats: - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} + * Required. The name of the parent to list Security Command Center services, + * in one of the following formats: + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` */ // const parent = 'abc123' /** @@ -42,12 +42,15 @@ function main(parent) { */ // const pageSize = 1234 /** - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. */ // const pageToken = 'abc123' /** - * Flag that, when set, will be used to filter the ModuleSettings that are - * in scope. The default setting is that all modules will be shown. + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. */ // const showEligibleModulesOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js index f0e03a5984c..b18cca26557 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.list_security_health_analytics_custom_modules.js @@ -29,8 +29,8 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` * * `projects/{project}/locations/{location}` @@ -42,7 +42,10 @@ function main(parent) { */ // const pageSize = 1234 /** - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * When paginating, the rest of the request must match the request that + * generated the page token. */ // const pageToken = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js index 1e887d262e9..36db8be6a11 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.simulate_security_health_analytics_custom_module.js @@ -30,10 +30,9 @@ function main(parent, customConfig, resource) { */ /** * Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see Relative - * Resource - * Name (https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * Example: `organizations/{organization_id}`. + * folder. For more information about relative resource names, see AIP-122: + * Resource names (https://google.aip.dev/122). Example: + * `organizations/{organization_id}`. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js index 35eb9f1e233..537420ad2cc 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_event_threat_detection_custom_module.js @@ -29,25 +29,24 @@ function main(updateMask, eventThreatDetectionCustomModule) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Field mask is used to specify the fields to be overwritten in the - * EventThreatDetectionCustomModule resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. + * Required. The fields to update. If omitted, then all fields are updated. */ // const updateMask = {} /** - * Required. The module being updated + * Required. The module being updated. */ // const eventThreatDetectionCustomModule = {} /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. */ // const validateOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_center_service.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_center_service.js index 045b894a221..7a733988cf8 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_center_service.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_center_service.js @@ -33,19 +33,23 @@ function main(securityCenterService, updateMask) { */ // const securityCenterService = {} /** - * Required. The list of fields to be updated. Possible values: - * * "intended_enablement_state" - * * "modules" + * Required. The fields to update. Accepts the following values: + * * `intended_enablement_state` + * * `modules` + * If omitted, then all eligible fields are updated. */ // const updateMask = {} /** - * Optional. When set to true, only validations (including IAM checks) will be - * done for the request (service will not be updated). An OK response - * indicates that the request is valid, while an error response indicates that - * the request is invalid. Note that a subsequent request to actually update - * the service could still fail for one of the following reasons: - * - The state could have changed (e.g. IAM permission lost). - * - A failure occurred while trying to delete the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no service will be updated. An `OK` response indicates that + * the request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to update the service could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during update of the service + * Defaults to `false`. */ // const validateOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js index 04f4e3ddd7c..1676bdfde19 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.update_security_health_analytics_custom_module.js @@ -29,24 +29,28 @@ function main(updateMask, securityHealthAnalyticsCustomModule) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The list of fields to be updated. The only fields that can be - * updated are `enablement_state` and `custom_config`. If empty or set to the - * wildcard value `*`, both `enablement_state` and `custom_config` are - * updated. + * Required. The fields to update. The following values are valid: + * * `custom_config` + * * `enablement_state` + * If you omit this field or set it to the wildcard value `*`, then all + * eligible fields are updated. */ // const updateMask = {} /** - * Required. The resource being updated + * Required. The resource being updated. */ // const securityHealthAnalyticsCustomModule = {} /** - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * Defaults to `false`. */ // const validateOnly = true diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js index c03d4c986d0..5264f550dc4 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/security_center_management.validate_event_threat_detection_custom_module.js @@ -29,9 +29,9 @@ function main(parent, rawText, type) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. Resource name of the parent to validate the Custom Module under. - * Its format is: - * * `organizations/{organization}/locations/{location}`. + * Required. Resource name of the parent to validate the custom modules under, + * in one of the following formats: + * * `organizations/{organization}/locations/{location}` */ // const parent = 'abc123' /** @@ -40,7 +40,7 @@ function main(parent, rawText, type) { */ // const rawText = 'abc123' /** - * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + * Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. */ // const type = 'abc123' diff --git a/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json b/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json index df7530bc666..ecc02799309 100644 --- a/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json +++ b/packages/google-cloud-securitycentermanagement/samples/generated/v1/snippet_metadata_google.cloud.securitycentermanagement.v1.json @@ -15,14 +15,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEffectiveSecurityHealthAnalyticsCustomModules_async", "title": "SecurityCenterManagement listEffectiveSecurityHealthAnalyticsCustomModules Sample", "origin": "API_DEFINITION", - "description": " Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors (no descendants).", + "description": " Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).", "canonical": true, "file": "security_center_management.list_effective_security_health_analytics_custom_modules.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 69, + "end": 71, "type": "FULL" } ], @@ -63,7 +63,7 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveSecurityHealthAnalyticsCustomModule_async", "title": "SecurityCenterManagement getEffectiveSecurityHealthAnalyticsCustomModule Sample", "origin": "API_DEFINITION", - "description": " Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule.", + "description": " Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule].", "canonical": true, "file": "security_center_management.get_effective_security_health_analytics_custom_module.js", "language": "JAVASCRIPT", @@ -103,14 +103,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListSecurityHealthAnalyticsCustomModules_async", "title": "SecurityCenterManagement listSecurityHealthAnalyticsCustomModules Sample", "origin": "API_DEFINITION", - "description": " Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors (no descendants).", + "description": " Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).", "canonical": true, "file": "security_center_management.list_security_health_analytics_custom_modules.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -151,14 +151,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantSecurityHealthAnalyticsCustomModules_async", "title": "SecurityCenterManagement listDescendantSecurityHealthAnalyticsCustomModules Sample", "origin": "API_DEFINITION", - "description": " Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent's CRM descendants.", + "description": " Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its descendants.", "canonical": true, "file": "security_center_management.list_descendant_security_health_analytics_custom_modules.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -199,14 +199,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetSecurityHealthAnalyticsCustomModule_async", "title": "SecurityCenterManagement getSecurityHealthAnalyticsCustomModule Sample", "origin": "API_DEFINITION", - "description": " Retrieves a SecurityHealthAnalyticsCustomModule.", + "description": " Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule].", "canonical": true, "file": "security_center_management.get_security_health_analytics_custom_module.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 53, + "end": 54, "type": "FULL" } ], @@ -239,14 +239,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateSecurityHealthAnalyticsCustomModule_async", "title": "SecurityCenterManagement createSecurityHealthAnalyticsCustomModule Sample", "origin": "API_DEFINITION", - "description": " Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", + "description": " Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are descendants of the given parent. These modules are enabled by default.", "canonical": true, "file": "security_center_management.create_security_health_analytics_custom_module.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 73, + "end": 75, "type": "FULL" } ], @@ -287,14 +287,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_UpdateSecurityHealthAnalyticsCustomModule_async", "title": "SecurityCenterManagement updateSecurityHealthAnalyticsCustomModule Sample", "origin": "API_DEFINITION", - "description": " Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", + "description": " Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom configuration of a module is supported on resident modules only.", "canonical": true, "file": "security_center_management.update_security_health_analytics_custom_module.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 71, + "end": 75, "type": "FULL" } ], @@ -335,14 +335,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteSecurityHealthAnalyticsCustomModule_async", "title": "SecurityCenterManagement deleteSecurityHealthAnalyticsCustomModule Sample", "origin": "API_DEFINITION", - "description": " Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", + "description": " Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.", "canonical": true, "file": "security_center_management.delete_security_health_analytics_custom_module.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -379,14 +379,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_SimulateSecurityHealthAnalyticsCustomModule_async", "title": "SecurityCenterManagement simulateSecurityHealthAnalyticsCustomModule Sample", "origin": "API_DEFINITION", - "description": " Simulates a given SecurityHealthAnalyticsCustomModule and Resource.", + "description": " Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a resource.", "canonical": true, "file": "security_center_management.simulate_security_health_analytics_custom_module.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 67, + "end": 66, "type": "FULL" } ], @@ -434,7 +434,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -475,7 +475,7 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_GetEffectiveEventThreatDetectionCustomModule_async", "title": "SecurityCenterManagement getEffectiveEventThreatDetectionCustomModule Sample", "origin": "API_DEFINITION", - "description": " Gets an effective ETD custom module. Retrieves the effective module at the given level. The difference between an EffectiveCustomModule and a CustomModule is that the fields for an EffectiveCustomModule are computed from ancestors if needed. For example, the enablement_state for a CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the enablement_state for an EffectiveCustomModule is always computed to ENABLED or DISABLED (the effective enablement_state).", + "description": " Gets the effective Event Threat Detection custom module at the given level. The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.", "canonical": true, "file": "security_center_management.get_effective_event_threat_detection_custom_module.js", "language": "JAVASCRIPT", @@ -515,14 +515,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListEventThreatDetectionCustomModules_async", "title": "SecurityCenterManagement listEventThreatDetectionCustomModules Sample", "origin": "API_DEFINITION", - "description": " Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", + "description": " Lists all Event Threat Detection custom modules for the given organization, folder, or project. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", "canonical": true, "file": "security_center_management.list_event_threat_detection_custom_modules.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 74, + "end": 72, "type": "FULL" } ], @@ -563,14 +563,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_ListDescendantEventThreatDetectionCustomModules_async", "title": "SecurityCenterManagement listDescendantEventThreatDetectionCustomModules Sample", "origin": "API_DEFINITION", - "description": " Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.", + "description": " Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.", "canonical": true, "file": "security_center_management.list_descendant_event_threat_detection_custom_modules.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -651,14 +651,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_CreateEventThreatDetectionCustomModule_async", "title": "SecurityCenterManagement createEventThreatDetectionCustomModule Sample", "origin": "API_DEFINITION", - "description": " Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", + "description": " Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", "canonical": true, "file": "security_center_management.create_event_threat_detection_custom_module.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 74, + "end": 76, "type": "FULL" } ], @@ -706,7 +706,7 @@ "segments": [ { "start": 25, - "end": 72, + "end": 71, "type": "FULL" } ], @@ -747,14 +747,14 @@ "regionTag": "securitycentermanagement_v1_generated_SecurityCenterManagement_DeleteEventThreatDetectionCustomModule_async", "title": "SecurityCenterManagement deleteEventThreatDetectionCustomModule Sample", "origin": "API_DEFINITION", - "description": " Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.", + "description": " Deletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy. This method is only supported for resident custom modules.", "canonical": true, "file": "security_center_management.delete_event_threat_detection_custom_module.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 67, + "end": 70, "type": "FULL" } ], @@ -890,7 +890,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 76, "type": "FULL" } ], @@ -942,7 +942,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 74, "type": "FULL" } ], diff --git a/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts b/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts index ca8096fbd74..418af7185e1 100644 --- a/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts +++ b/packages/google-cloud-securitycentermanagement/src/v1/security_center_management_client.ts @@ -520,7 +520,8 @@ export class SecurityCenterManagementClient { // -- Service calls -- // ------------------- /** - * Gets details of a single EffectiveSecurityHealthAnalyticsCustomModule. + * Gets details of a single + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule}. * * @param {Object} request * The request object that will be sent. @@ -528,9 +529,9 @@ export class SecurityCenterManagementClient { * Required. The full resource name of the custom module, specified in one of * the following formats: * - * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` - * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{effective_security_health_analytics_custom_module}` + * * `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -625,12 +626,14 @@ export class SecurityCenterManagementClient { ); } /** - * Retrieves a SecurityHealthAnalyticsCustomModule. + * Retrieves a + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. Name of the resource + * Required. Name of the resource, in the format + * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -725,31 +728,38 @@ export class SecurityCenterManagementClient { ); } /** - * Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the - * given CRM parent, and also creates inherited - * SecurityHealthAnalyticsCustomModules for all CRM descendants of the given - * parent. These modules are enabled by default. + * Creates a resident + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * at the scope of the given organization, folder, or project, and also + * creates inherited `SecurityHealthAnalyticsCustomModule` resources for all + * folders and projects that are descendants of the given parent. These + * modules are enabled by default. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Name of the parent organization, folder, or project of the - * module, specified in one of the following formats: + * module, in one of the following formats: * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` * * `projects/{project}/locations/{location}` * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule - * Required. The resource being created + * Required. The resource being created. * @param {boolean} [request.validateOnly] - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because: - * 1. the state could have changed (e.g. IAM permission lost) or - * 2. A failure occurred during creation of the module. - * Defaults to false. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -844,29 +854,40 @@ export class SecurityCenterManagementClient { ); } /** - * Updates the SecurityHealthAnalyticsCustomModule under the given name based - * on the given update mask. Updating the enablement state is supported on - * both resident and inherited modules (though resident modules cannot have an - * enablement state of "inherited"). Updating the display name and custom - * config of a module is supported on resident modules only. + * Updates the + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * under the given name based on the given update mask. Updating the + * enablement state is supported on both resident and inherited modules + * (though resident modules cannot have an enablement state of "inherited"). + * Updating the display name and custom configuration of a module is supported + * on resident modules only. * * @param {Object} request * The request object that will be sent. * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. The only fields that can be - * updated are `enablement_state` and `custom_config`. If empty or set to the - * wildcard value `*`, both `enablement_state` and `custom_config` are - * updated. + * Required. The fields to update. The following values are valid: + * + * * `custom_config` + * * `enablement_state` + * + * If you omit this field or set it to the wildcard value `*`, then all + * eligible fields are updated. * @param {google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule} request.securityHealthAnalyticsCustomModule - * Required. The resource being updated + * Required. The resource being updated. * @param {boolean} [request.validateOnly] - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -962,28 +983,34 @@ export class SecurityCenterManagementClient { ); } /** - * Deletes the specified SecurityHealthAnalyticsCustomModule and all of its - * descendants in the CRM hierarchy. This method is only supported for - * resident custom modules. + * Deletes the specified + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * and all of its descendants in the resource hierarchy. This method is only + * supported for resident custom modules. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of the SHA custom module. - * - * Its format is: + * Required. The resource name of the SHA custom module, in one of the + * following formats: * - * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. - * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{security_health_analytics_custom_module}`. + * * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` * @param {boolean} [request.validateOnly] - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during deletion of the module + * + * Defaults to `false`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1078,16 +1105,17 @@ export class SecurityCenterManagementClient { ); } /** - * Simulates a given SecurityHealthAnalyticsCustomModule and Resource. + * Simulates the result of using a + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * to check a resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The relative resource name of the organization, project, or - * folder. For more information about relative resource names, see [Relative - * Resource - * Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) - * Example: `organizations/{organization_id}`. + * folder. For more information about relative resource names, see [AIP-122: + * Resource names](https://google.aip.dev/122). Example: + * `organizations/{organization_id}`. * @param {google.cloud.securitycentermanagement.v1.CustomConfig} request.customConfig * Required. The custom configuration that you need to test. * @param {google.cloud.securitycentermanagement.v1.SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource} request.resource @@ -1186,24 +1214,28 @@ export class SecurityCenterManagementClient { ); } /** - * Gets an effective ETD custom module. Retrieves the effective module at the - * given level. The difference between an EffectiveCustomModule and a - * CustomModule is that the fields for an EffectiveCustomModule are computed - * from ancestors if needed. For example, the enablement_state for a - * CustomModule can be either ENABLED, DISABLED, or INHERITED. Where as the - * enablement_state for an EffectiveCustomModule is always computed to ENABLED - * or DISABLED (the effective enablement_state). + * Gets the effective Event Threat Detection custom module at the given level. + * + * The difference between an + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule|EffectiveEventThreatDetectionCustomModule} + * and an + * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule|EventThreatDetectionCustomModule} + * is that the fields for an `EffectiveEventThreatDetectionCustomModule` are + * computed from ancestors if needed. For example, the enablement state for an + * `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or + * `INHERITED`. In contrast, the enablement state for an + * `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` + * or `DISABLED`. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of the ETD custom module. - * - * Its format is: + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: * - * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{effective_event_threat_detection_custom_module}`. + * * `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1303,13 +1335,12 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of the ETD custom module. + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: * - * Its format is: - * - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1405,30 +1436,36 @@ export class SecurityCenterManagementClient { } /** * Creates a resident Event Threat Detection custom module at the scope of the - * given Resource Manager parent, and also creates inherited custom modules - * for all descendants of the given parent. These modules are enabled by - * default. + * given organization, folder, or project, and creates inherited custom + * modules for all descendants of the given parent. These modules are enabled + * by default. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent for the module. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent for the module, in one of the following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule * Required. The module to create. The - * event_threat_detection_custom_module.name will be ignored and server - * generated. + * {@link protos.google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name|EventThreatDetectionCustomModule.name} + * field is ignored; Security Command Center generates the name. * @param {boolean} [request.validateOnly] - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (no module will be created). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually create the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred during creation of the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be created. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to create the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1533,21 +1570,23 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * EventThreatDetectionCustomModule resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. + * Required. The fields to update. If omitted, then all fields are updated. * @param {google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule} request.eventThreatDetectionCustomModule - * Required. The module being updated + * Required. The module being updated. * @param {boolean} [request.validateOnly] - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be updated). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually update the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to update the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be updated. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to update the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1644,27 +1683,32 @@ export class SecurityCenterManagementClient { } /** * Deletes the specified Event Threat Detection custom module and all of its - * descendants in the Resource Manager hierarchy. This method is only - * supported for resident custom modules. + * descendants in the resource hierarchy. This method is only supported for + * resident custom modules. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name of the ETD custom module. + * Required. The resource name of the Event Threat Detection custom module, in + * one of the following formats: * - * Its format is: - * - * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. - * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{event_threat_detection_custom_module}`. + * * `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` + * * `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}` * @param {boolean} [request.validateOnly] - * Optional. When set to true, only validations (including IAM checks) will - * done for the request (module will not be deleted). An OK response indicates - * the request is valid while an error response indicates the request is - * invalid. Note that a subsequent request to actually delete the module could - * still fail because 1. the state could have changed (e.g. IAM permission - * lost) or - * 2. A failure occurred while trying to delete the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no module will be deleted. An `OK` response indicates that the + * request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to delete the module could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during creation of the module + * + * Defaults to `false`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1764,16 +1808,15 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Resource name of the parent to validate the Custom Module under. + * Required. Resource name of the parent to validate the custom modules under, + * in one of the following formats: * - * Its format is: - * - * * `organizations/{organization}/locations/{location}`. + * * `organizations/{organization}/locations/{location}` * @param {string} request.rawText * Required. The raw text of the module's contents. Used to generate error * messages. * @param {string} request.type - * Required. The type of the module (e.g. CONFIGURABLE_BAD_IP). + * Required. The type of the module. For example, `CONFIGURABLE_BAD_IP`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1873,24 +1916,23 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Security Command Center service to retrieve. + * Required. The Security Command Center service to retrieve, in one of the + * following formats: * - * Formats: + * * organizations/{organization}/locations/{location}/securityCenterServices/{service} + * * folders/{folder}/locations/{location}/securityCenterServices/{service} + * * projects/{project}/locations/{location}/securityCenterServices/{service} * - * * organizations/{organization}/locations/{location}/securityCenterServices/{service} - * * folders/{folder}/locations/{location}/securityCenterServices/{service} - * * projects/{project}/locations/{location}/securityCenterServices/{service} + * The following values are valid for `{service}`: * - * The possible values for id {service} are: - * - * * container-threat-detection - * * event-threat-detection - * * security-health-analytics - * * vm-threat-detection - * * web-security-scanner + * * `container-threat-detection` + * * `event-threat-detection` + * * `security-health-analytics` + * * `vm-threat-detection` + * * `web-security-scanner` * @param {boolean} request.showEligibleModulesOnly - * Flag that, when set, will be used to filter the ModuleSettings that are - * in scope. The default setting is that all modules will be shown. + * Set to `true` to show only modules that are in scope. By default, all + * modules are shown. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1992,18 +2034,26 @@ export class SecurityCenterManagementClient { * @param {google.cloud.securitycentermanagement.v1.SecurityCenterService} request.securityCenterService * Required. The updated service. * @param {google.protobuf.FieldMask} request.updateMask - * Required. The list of fields to be updated. Possible values: + * Required. The fields to update. Accepts the following values: + * + * * `intended_enablement_state` + * * `modules` * - * * "intended_enablement_state" - * * "modules" + * If omitted, then all eligible fields are updated. * @param {boolean} [request.validateOnly] - * Optional. When set to true, only validations (including IAM checks) will be - * done for the request (service will not be updated). An OK response - * indicates that the request is valid, while an error response indicates that - * the request is invalid. Note that a subsequent request to actually update - * the service could still fail for one of the following reasons: - * - The state could have changed (e.g. IAM permission lost). - * - A failure occurred while trying to delete the module. + * Optional. When set to `true`, the request will be validated (including IAM + * checks), but no service will be updated. An `OK` response indicates that + * the request is valid, while an error response indicates that the request is + * invalid. + * + * If the request is valid, a subsequent request to update the service could + * still fail for one of the following reasons: + * + * * The state of your cloud resources changed; for example, you lost a + * required IAM permission + * * An error occurred during update of the service + * + * Defaults to `false`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2100,25 +2150,30 @@ export class SecurityCenterManagementClient { } /** - * Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the - * given parent. This includes resident modules defined at the scope of the - * parent, and inherited modules, inherited from CRM ancestors (no - * descendants). + * Returns a list of all + * {@link protos.google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule|EffectiveSecurityHealthAnalyticsCustomModule} + * resources for the given parent. This includes resident modules defined at + * the scope of the parent, and inherited modules, inherited from ancestor + * organizations, folders, and projects (no descendants). * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2215,17 +2270,21 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2268,17 +2327,21 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. specified in one - * of the following formats: + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` - * or - * `projects/{project}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2316,15 +2379,17 @@ export class SecurityCenterManagementClient { ) as AsyncIterable; } /** - * Returns a list of all SecurityHealthAnalyticsCustomModules for the given - * parent. This includes resident modules defined at the scope of the parent, - * and inherited modules, inherited from CRM ancestors (no descendants). + * Returns a list of all + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * resources for the given parent. This includes resident modules defined at + * the scope of the parent, and inherited modules, inherited from ancestor + * organizations, folders, and projects (no descendants). * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` @@ -2333,7 +2398,11 @@ export class SecurityCenterManagementClient { * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2430,8 +2499,8 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` @@ -2440,7 +2509,11 @@ export class SecurityCenterManagementClient { * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2482,8 +2555,8 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent organization, folder, or project in which to list - * custom modules, specified in one of the following formats: + * Required. Name of the parent organization, folder, or project in which to + * list custom modules, in one of the following formats: * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` @@ -2492,7 +2565,11 @@ export class SecurityCenterManagementClient { * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2528,14 +2605,16 @@ export class SecurityCenterManagementClient { ) as AsyncIterable; } /** - * Returns a list of all resident SecurityHealthAnalyticsCustomModules under - * the given CRM parent and all of the parent's CRM descendants. + * Returns a list of all resident + * {@link protos.google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule|SecurityHealthAnalyticsCustomModule} + * resources under the given organization, folder, or project and all of its + * descendants. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: + * list custom modules, in one of the following formats: * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` @@ -2544,7 +2623,11 @@ export class SecurityCenterManagementClient { * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2642,7 +2725,7 @@ export class SecurityCenterManagementClient { * The request object that will be sent. * @param {string} request.parent * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: + * list custom modules, in one of the following formats: * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` @@ -2651,7 +2734,11 @@ export class SecurityCenterManagementClient { * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2695,7 +2782,7 @@ export class SecurityCenterManagementClient { * The request object that will be sent. * @param {string} request.parent * Required. Name of the parent organization, folder, or project in which to - * list custom modules, specified in one of the following formats: + * list custom modules, in one of the following formats: * * * `organizations/{organization}/locations/{location}` * * `folders/{folder}/locations/{location}` @@ -2704,7 +2791,11 @@ export class SecurityCenterManagementClient { * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2749,16 +2840,21 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2855,16 +2951,21 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2907,16 +3008,21 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list effective custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list effective custom modules, in one of the + * following formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -2954,30 +3060,29 @@ export class SecurityCenterManagementClient { ) as AsyncIterable; } /** - * Lists all Event Threat Detection custom modules for the given - * Resource Manager parent. This includes resident modules defined at the - * scope of the parent along with modules inherited from ancestors. + * Lists all Event Threat Detection custom modules for the given organization, + * folder, or project. This includes resident modules defined at the scope of + * the parent along with modules inherited from ancestors. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. + * fewer than this value. If unspecified, at most 10 modules will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. * - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3074,23 +3179,22 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. + * fewer than this value. If unspecified, at most 10 modules will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. * - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3132,23 +3236,22 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of modules to return. The service may return - * fewer than this value. If unspecified, at most 10 configs will be returned. + * fewer than this value. If unspecified, at most 10 modules will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A page token, received from a previous - * `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the - * subsequent page. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. * - * When paginating, all other parameters provided to - * `ListEventThreatDetectionCustomModules` must match the call that provided - * the page token. + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -3184,23 +3287,28 @@ export class SecurityCenterManagementClient { ) as AsyncIterable; } /** - * Lists all resident Event Threat Detection custom modules under the - * given Resource Manager parent and its descendants. + * Lists all resident Event Threat Detection custom modules for the given + * organization, folder, or project and its descendants. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of modules to return. The service may return * fewer than this value. If unspecified, at most 10 configs will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3297,17 +3405,22 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of modules to return. The service may return * fewer than this value. If unspecified, at most 10 configs will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3350,17 +3463,22 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. Name of parent to list custom modules. Its format is - * `organizations/{organization}/locations/{location}`, - * `folders/{folder}/locations/{location}`, - * or - * `projects/{project}/locations/{location}` + * Required. Name of parent to list custom modules, in one of the following + * formats: + * + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of modules to return. The service may return * fewer than this value. If unspecified, at most 10 configs will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} @@ -3404,21 +3522,24 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent to list Security Command Center services. + * Required. The name of the parent to list Security Command Center services, + * in one of the following formats: * - * Formats: - * - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {boolean} request.showEligibleModulesOnly - * Flag that, when set, will be used to filter the ModuleSettings that are - * in scope. The default setting is that all modules will be shown. + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -3515,21 +3636,24 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent to list Security Command Center services. - * - * Formats: + * Required. The name of the parent to list Security Command Center services, + * in one of the following formats: * - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {boolean} request.showEligibleModulesOnly - * Flag that, when set, will be used to filter the ModuleSettings that are - * in scope. The default setting is that all modules will be shown. + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -3570,21 +3694,24 @@ export class SecurityCenterManagementClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the parent to list Security Command Center services. + * Required. The name of the parent to list Security Command Center services, + * in one of the following formats: * - * Formats: - * - * * organizations/{organization}/locations/{location} - * * folders/{folder}/locations/{location} - * * projects/{project}/locations/{location} + * * `organizations/{organization}/locations/{location}` + * * `folders/{folder}/locations/{location}` + * * `projects/{project}/locations/{location}` * @param {number} [request.pageSize] * Optional. The maximum number of results to return in a single response. * Default is 10, minimum is 1, maximum is 1000. * @param {string} [request.pageToken] - * Optional. The value returned by the last call indicating a continuation. + * Optional. A pagination token returned from a previous request. Provide this + * token to retrieve the next page of results. + * + * When paginating, the rest of the request must match the request that + * generated the page token. * @param {boolean} request.showEligibleModulesOnly - * Flag that, when set, will be used to filter the ModuleSettings that are - * in scope. The default setting is that all modules will be shown. + * Flag that, when set, is used to filter the module settings that are shown. + * The default setting is that all modules are shown. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object}